Skip to main content
Solved

Populate a grid column when a grid selection column value is selected


Forum|alt.badge.img

I’m working on a modification on Payment Screen (AR302000) “DOCUMENT TO APPLY” grid. I need to to populate data into a another call when user selects Reference Nbr. What should be the best event to handle here?

Please refer the image below:

Thank you

Best answer by Nilkanth Dipak

Hi @oshadhat83,

To handle the event when a user selects a Reference Nbr in the "DOCUMENT TO APPLY" grid on the Payments and Applications Screen (AR302000), the best approach is to use the FieldUpdated event for the appropriate field. In this case, you would typically handle the event for the ARAdjust.AdjdRefNbr field, which corresponds to the reference number of the document being applied.

public class ARPaymentEntry_Extension : PXGraphExtension<ARPaymentEntry>
{
    protected void ARAdjust_AdjdRefNbr_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
    {
       var row = (ARAdjust)e.Row;
       if (row == null) return;

       //logic to retrieve the field you needed.
    }
}

Hope, it helps!

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

2 replies

Nilkanth Dipak
Semi-Pro I
Forum|alt.badge.img+10

Hi @oshadhat83,

To handle the event when a user selects a Reference Nbr in the "DOCUMENT TO APPLY" grid on the Payments and Applications Screen (AR302000), the best approach is to use the FieldUpdated event for the appropriate field. In this case, you would typically handle the event for the ARAdjust.AdjdRefNbr field, which corresponds to the reference number of the document being applied.

public class ARPaymentEntry_Extension : PXGraphExtension<ARPaymentEntry>
{
    protected void ARAdjust_AdjdRefNbr_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
    {
       var row = (ARAdjust)e.Row;
       if (row == null) return;

       //logic to retrieve the field you needed.
    }
}

Hope, it helps!


darylbowman
Captain II
Forum|alt.badge.img+13

A defaulting event for the custom field and calling e.Cache.SetDefaultExt in the FieldUpdated event for Ref Nbr would work well.

I prefer this because if the defaulting logic isn't terribly complicated, all of this can be controlled with DAC attributes with

[PXDefault]

and

[PXFormula(typeof(Default<>))]


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