Skip to main content
Solved

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

  • January 13, 2022
  • 3 replies
  • 112 views

Forum|alt.badge.img+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 ?

Best answer by Naveen Boga

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"; }}

 

3 replies

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

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"; }}

 


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

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 


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

@Ivan Most Welcome :-)