Skip to main content

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

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!


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