Sage X3: Understanding How To Add Action to the Field

Posted in Best Practices, Sage Products and Updates | No Comments »
Posted by Mantralogix

During development in Sage X3 you may be required to update certain fields based on one field value. Did you know that this can be performed with the Field Action option? It’s true. Read on to learn more.

Field actions are triggered by different events when the user navigates through screen fields. Field actions can be linked to direct code (sub programs found in the screen processes) or to actions from the Action dictionary.

Here is an easy-to-follow example of how to perform an action after a field is updated. If you’re interested in learning more, speak to a Mantralogix team member today! What follows below is a general technique that can be used in any field.

First, let’s look at the Customer screen and Financial tab:

 

commondata.png

In this scenario, we will update the Group customer, Risk customer and the Pay by customer to be same as Bill to customer. All values will be the same. We don’t want the users to enter each field separately.

First, we’ll set the fields to Display. This is to restrict the user from modifying the fields. We do this in the Screens where we navigate to the BPC3 screen and change the appropriate values from Enter to Display:

billto.png

 

Now select the Bill to customer field and add the action at the bottom. We are adding an “After change” action to the field. Save and validate the screen.

 

1-395545501293546280.png

2-7.png

 

SPE (Specific) means that the action handler will be handled in the specific processing file for this screen. We validate the screen and go to the General tab, from there we can access the specific processing file SPEBPC. Here we need to type in the following:

 

3-6.png

 

This SPE action will be called each time the value of the BPCINV field is modified. The new value is passed in the VALEUR parameter. So we assign this value to the other three fields and then we use the Affzo instruction to refresh the screen value. This way we will always change only the Bill to customer and the other fields will be synced automatically.

Need more information on Sage X3 or have questions and need assistance? Get in touch with our Sage X3 team at 1-866-320-8922 or email us at info@mantralogix.com.


Online Support


Name:

Code :


To use our online support:
  1. Please type your name and the unique connection code provided by your Mantralogix support representative.
  2. Click the Submit button to initiate the screen-sharing session.
  3. You will be connected to a Mantralogix representative who will assist you via online chat, and if needed, by viewing your screen and sharing your keyboard and mouse.
  4. You will be prompted to download our virus-free plug-in "chatlink.exe". Click Yes or Grant when prompted.
  5. You are in full control of your computer at all times. You always have overriding control of your mouse and keyboard, and you can end the screen-sharing session at any time.