I’m trying to set the Company/Branch field of the Load Options(Load Documents) dialog from the Payments and Applications screen to default to the whole organization as opposed to a specific branch.
However, the field is configured with the OrganizationTree attribute, which doesn’t have an obvious way of overwriting the default.
Since this field resolves to a the Baccount of the branch or organization, I tried appending PXDefault(1), but no dice.
Anyone deal with this before?
Best answer by darylbowman
PXDefault by itself may not do it, because it probably is receiving a default value elsewhere
The new value must be a BAccountID from the Organization table
Anyone deal with this before?
No, but I was curious.
Try this, replacing “CAP” with your Company CD as a string:
public class Test : PXGraphExtension<ARPaymentEntry> { protected virtual void _(Events.FieldDefaulting<ARPaymentEntry.LoadOptions, ARPaymentEntry.LoadOptions.orgBAccountID> e, PXFieldDefaulting b) { ARPaymentEntry.LoadOptions row = e.Row; if (row is null) return;
PXDefault by itself may not do it, because it probably is receiving a default value elsewhere
The new value must be a BAccountID from the Organization table
Anyone deal with this before?
No, but I was curious.
Try this, replacing “CAP” with your Company CD as a string:
public class Test : PXGraphExtension<ARPaymentEntry> { protected virtual void _(Events.FieldDefaulting<ARPaymentEntry.LoadOptions, ARPaymentEntry.LoadOptions.orgBAccountID> e, PXFieldDefaulting b) { ARPaymentEntry.LoadOptions row = e.Row; if (row is null) return;