Solved

Extract data from Customers tab

  • 13 January 2022
  • 3 replies
  • 29 views

Userlevel 4
Badge +1

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 ? 

icon

Best answer by Naveen Boga 14 January 2022, 01:31

View original

3 replies

Userlevel 7
Badge +12

Hi @Ivan Yes, since you are using Customer ID, you will get header customer data.

Instead, In your query, please use the AdjdCustomerID, like below and verify.

 

 

Userlevel 4
Badge +1

Hi @Ivan Yes, since you are using Customer ID, you will get header customer data.

Instead, In your query, please use the AdjdCustomerID, like below and verify.

 

 

thanks a lot. It worked 

Userlevel 7
Badge +12

@Ivan Great :) thanks for sharing the update.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2022  Acumatica, Inc. All rights reserved