Solved

Retrieve value Customer from "Documents To Apply" tab in Payment

  • 13 January 2022
  • 3 replies
  • 85 views

Userlevel 4
Badge +2

Hi, 

I am trying to extract the value from customer in details, as it shown at screen its name is AdjdCustomerID

However, when I am getting this value in a code ,

 foreach (PXResult<AR.ARAdjust, AR.ARInvoice, PX.Objects.AR.Standalone.ARRegisterAlias, ARTran> gridRow in Base.Adjustments.Select())
                                {
                                    AR.ARAdjust _adjust = gridRow;
                               
                                    try { codeWordArtsyl = _adjust .AdjdCustomerID.ToString() + "VCARD"; }}

I am receiving codes (4096, 4078) instead of names ABCVENTURE, ARTCAGES as it is depicted at screenshot.

How to extract names of Customers from this tab ?

icon

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

View original

3 replies

Userlevel 7
Badge +17

@Ivan Most Welcome :-) 

Userlevel 4
Badge +2

Hi @Ivan  In ARAdjust table, system will store only the ID values ((4096, 4078)), but not the CD values(ABCVENTURE, ARTCAGES).

In order to fetch the CD values, make a another query to BAccount table fetch the data like below.

 

  foreach (PXResult<ARAdjust, ARInvoice, PX.Objects.AR.Standalone.ARRegisterAlias, ARTran> gridRow1 in Base.Adjustments.Select())
{
ARAdjust _adjust = gridRow;

BAccount objBAccount = PXSelect<BAccount, Where<BAccount.bAccountID, Equal<Required<BAccount.bAccountID>>>>.Select(Base, _adjust.AdjdCustomerID);


try { codeWordArtsyl = objBAccount?.AcctCD.ToString() + "VCARD"; }}

 

Thank you very much 

Userlevel 7
Badge +17

Hi @Ivan  In ARAdjust table, system will store only the ID values ((4096, 4078)), but not the CD values(ABCVENTURE, ARTCAGES).

In order to fetch the CD values, make a another query to BAccount table fetch the data like below.

 

  foreach (PXResult<ARAdjust, ARInvoice, PX.Objects.AR.Standalone.ARRegisterAlias, ARTran> gridRow1 in Base.Adjustments.Select())
{
ARAdjust _adjust = gridRow;

BAccount objBAccount = PXSelect<BAccount, Where<BAccount.bAccountID, Equal<Required<BAccount.bAccountID>>>>.Select(Base, _adjust.AdjdCustomerID);


try { codeWordArtsyl = objBAccount?.AcctCD.ToString() + "VCARD"; }}

 

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 — 2024  Acumatica, Inc. All rights reserved