I am new to Acumatica and am struggling to get a selector working in the purchase order screen. I want to add a customer field to the screen in the header area. I have created a custom field and want to use a selector to allow the user to choose the customer for the PO.
Here is the custom field:
[PXDBString]
[PXUIField(DisplayName = "Customer")]
[PXSelector(typeof(SearchFor<Customer.bAccountID>
.In<SelectFrom<MOSCustomerProject>
.InnerJoin<BAccount>
.On<Customer.bAccountID.IsEqual<BAccount.bAccountID>>>),
new Type[] {
typeof(Customer.bAccountID),
typeof(BAccount.acctName)
},
DescriptionField = typeof(BAccount.acctName),
SubstituteKey = typeof(BAccount.bAccountID))]
The issue that I am having is that the selector does not get populated with the customers. If I manually put a customer’s bAccountID in the database field, the correct customer's name is displayed but opening the selector does not show the list of customers.