Create a Custom Button to Launch an Acumatica Screen Pre-Loaded with a Record

Button

Here’s a great time-saving project I recently did. I had a customer who wanted a button on a screen in their Acumatica system to launch the Journal Entry window.  Not only did it launch the window, they wanted that screen loaded with data provided from the source page of the button. So, I built a button and placed it next to a field on a custom ASPX Form/Detail page in their system.

How to build the Acumatica custom button

  1. Create a button on the graph to handle the button press logic and launch the target screen (in this case the Journal Entry Screen)
  2. Edit the ASPX page to handle the call back
  3. Edit the ASPX page to add the button

Code for your graph:

ASPX page in Acumatica for custom button

Code for ASPX Page

This will enable the screen call back to the graph. TYPENAME should be the class name of your graph.

ASPX page in Acumatica for custom button

Within the PXFORMVIEW section add a layout rule to enable the screen to merge the field and the custom button on the same horizontal line. Add the PXButton element directly under the field and make sure the CommandName is targeting the method created on the graph.

ASPX page in Acumatica for custom button

This is what the form page would look like. Pressing the VIEW JE button will launch the Journal Entry screen with the GL100020 already loaded.

ASPX page in Acumatica

You can also experiment with a pop up style launch of the JE screen by using this line below.

 throw new PXPopupRedirectException( graph, “Journal Entry”);

For more great Acumatica tips & tricks, make sure to check out our other blog posts.

If you have questions or need some assistance, visit our support page for more help.

 

Leave a Reply