Skip to main content

Hi,

In the Sales Orders screen, a client is wanting to search for a customer in the Customer box using the Ext Ref Nbr as well as the Customer ID, as they have migrated some customer data across from another system which could be looked up via both an ID and a reference number.

I have added the Ext Ref Nbr column to the selector, as shown below, but I am unsure how to include this column in the filtering function.

The code below is how I attempted to do it, but this just made the Customer selector return no results at all when you first click on the magnifying glass icon of the selector.

Do you have any recommendations for how I could implement this?

Let me know if I can provide any other information.

Kind regards,

Andrew

 

"PXDefault]
/Customer(
typeof(Search<BAccountR.bAccountID
Where2<
Where<BAccountR.acctCD, Like<Current<SOOrder.customerID>>, // Search by Customer ID
Or<BAccountR.acctName, Like<Current<SOOrder.customerID>>, // Search by Customer Name
Or<BAccountR.extRefNbr, Like<Current<SOOrder.customerID>>>>>, // Search by Ext Ref Nbr
And<Match<Current<AccessInfo.userName>>>>>),
Visibility = PXUIVisibility.SelectorVisible,
DescriptionField = typeof(Customer.acctName),
Filterable = true)]
/CustomerOrOrganizationInNoUpdateDocRestrictor]
/PXRestrictor(typeof(Where<Optional<SOOrder.isTransferOrder>, Equal<True>,
Or<Customer.status, IsNull,
Or<Customer.status, Equal<CustomerStatus.active>,
Or<Customer.status, Equal<CustomerStatus.oneTime>>>>>),
AR.Messages.CustomerIsInStatus,
typeof(Customer.status))]
/PXForeignReference(typeof(Field<SOOrder.customerID>.IsRelatedTo<BAccount.bAccountID>))]

 

In the Layout Properties of the Customer field, set the FilterByAllFields property to True.

 

 


That’s perfect, thanks for that @Django !


Reply