Hi,
I need to extract customer data inside my event that is called after user selects a definite payment
After payment was select, I pass the customerID from payment that was selected to Customer Search method
It was suggested in this topic :
to use the following code :
It works perfectly, but it always extract data only from customer that is located in header of my payment “ABCHOLDING”
But I need o get the data for each customer from Details tab
So, in my code I am going throw cycle inside payment rows and passing the parameter of customer according to my last string to the search method
foreach (PXResult<AR.ARAdjust, AR.ARInvoice, PX.Objects.AR.Standalone.ARRegisterAlias, ARTran> gridRow in Base.Adjustments.Select())
{
AR.ARAdjust _Adjust = gridRow;
AR.ARInvoice _Invoice = gridRow;
PXResult<Customer, Contact, LocationExtAddress> objCustomer = (PXResult<Customer, Contact, LocationExtAddress>)
PXSelectJoin<Customer, LeftJoin<Contact, On<Customer.defContactID, Equal<Contact.contactID>>,
LeftJoin<LocationExtAddress, On<Customer.bAccountID, Equal<LocationExtAddress.locationBAccountID>>>>,
Where<Customer.bAccountID, Equal<Required<Customer.bAccountID>>>>.Select(Base, _Adjust.CustomerID);/*Base.Document.Current.CustomerID)*/;
}
But it always return only for Header customer data, not for “Documents to Apply ” tab Customers
What should be passed to this method ?
Best answer by Naveen Boga
View original