Skip to main content
Solved

Extract data from Customers tab

  • January 13, 2022
  • 3 replies
  • 61 views

Forum|alt.badge.img+2

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

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.

 

 

3 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • Answer
  • January 14, 2022

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.

 

 


Forum|alt.badge.img+2
  • Author
  • Varsity I
  • January 14, 2022

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 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • January 14, 2022

@Ivan Great :) thanks for sharing the update.