Skip to main content
Solved

Event execution challenges

  • 3 March 2022
  • 1 reply
  • 56 views

Forum|alt.badge.img

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

Best answer by yhartman

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;
    }

 

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+3
  • Jr Varsity I
  • 61 replies
  • Answer
  • March 10, 2022

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings