Solved

Event execution challenges

  • 3 March 2022
  • 1 reply
  • 56 views

Userlevel 2
Badge

Hello, 

I am working with the Customer Locations AR303020 screen.
Note: I added a “pencil” button to the right of the Location field on the Sales Orders screen to launch the Customer Locations AR303020 screen as a popup..


My Experience level:

Less than one year.
 

Issue:

The Location Selector does not execute a LocationID_FieldUpdated or a LocationCD_FieldUpdated event (tried both, I only need one of them to work for what I am doing).

When I change the Location Selector value in Debug at runtime, my breakpoint (in red below) is not respected and the code is skipped.


Sample code:

  protected void Location_LocationID_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e, PXFieldUpdated InvokeBaseHandler)
        {
            if (InvokeBaseHandler != null)
                InvokeBaseHandler(cache, e);
            var row = (Location)e.Row;

            row.OverrideAddress = true;               // This code is expected to be executed when the
                                                                        // Location Selector value has been updated.
            row.OverrideContact = true;                

        }

 

Acumatica version:

2021 R1 Build 21.118.0038
 

Questions:

  1. Has anyone experienced this issue with this particular screen before?
  2. Is there something special (not obvious) about this screen that may be getting in-the-way of the execution of the FieldUpdated event?
  3. Can you suggest other areas besides this screen, that I should look into?
  4. Could this be some odd behavior that is present in this version of Acumatica
    (2021 R1 Build 21.118.0038)?

Thank you in advance for sharing any ideas or insights you may have.

Ken Severud

icon

Best answer by yhartman 10 March 2022, 05:26

View original

1 reply

Userlevel 5
Badge +3

Use RowSelected on the location instead of FieldUpdated. RowSelected is triggered each time a profile a whole is loaded. 


public void _(Events.RowSelected<Location> e)
{
var row = e.Row;

if (row == null)
return;
}

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved