Does anyone have an opinion on the best way to press two action buttons from another graph on a graph extension?
More Specifically I want to press the “Print Courier Label” action button and the “Confirm Shipment” action button from my pick/pack/ship screen.
Do I need to bite the bullet and learn how to edit the ASPX page?
Or can I trigger it in a graph extension?
I tried using an event handler, but I must have done it wrong, couldn’t get it working.
I couldn’t get it working in the workflow editor either as the existing actions are on the Shipment screen and I want to Action them from the pick/pack/ship screen.
If someone could steer me in the wright direction I can figure out the rest, i.e., what type of methods
Thank you
Best answer by Yuriy Zaletskyy
Suddens wrote:
Do I need to bite the bullet and learn how to edit the ASPX page?
I believe not.
Suddens wrote:
More Specifically I want to press the “Print Courier Label” action button and the “Confirm Shipment” action button from my pick/pack/ship screen.
I’d assume, that you’ve created graph like this:
var graph = PXGraph.CreateInstance<SOOrderEntry>();
//load graph with some sales order
in that scenario, all avaialable actions will be in collection Actions. You need to find out which action is responsible for some activity in C#. I’d assume, that Print Courier Label is described in Acumatica with name “PrintCourierLabel”, and button Confirm Shipment is described as “ConfirmShipment”.
you can call anyone of them like this:
graph.Actions["PrintCourierLabel"].Press();
// Potentially you may need// PXLongOperation.WaitCompletion(graph.UID);
graph.Actions["ConfirmShipment"].Press();
Do I need to bite the bullet and learn how to edit the ASPX page?
I believe not.
Suddens wrote:
More Specifically I want to press the “Print Courier Label” action button and the “Confirm Shipment” action button from my pick/pack/ship screen.
I’d assume, that you’ve created graph like this:
var graph = PXGraph.CreateInstance<SOOrderEntry>();
//load graph with some sales order
in that scenario, all avaialable actions will be in collection Actions. You need to find out which action is responsible for some activity in C#. I’d assume, that Print Courier Label is described in Acumatica with name “PrintCourierLabel”, and button Confirm Shipment is described as “ConfirmShipment”.
you can call anyone of them like this:
graph.Actions["PrintCourierLabel"].Press();
// Potentially you may need// PXLongOperation.WaitCompletion(graph.UID);
graph.Actions["ConfirmShipment"].Press();
From the side of looking for answer, I’d suggest you next time mention this in the question:
I need to call two actions xxx, and yyy, which are on the screen: “name of the screen”, screenid is zzz. In such case it will be easier to give you more precise answer.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.