Skip to main content
Solved

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


Forum|alt.badge.img+2
  • Varsity I
  • 283 replies

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

 

View original
Did this topic help you find an answer to your question?

3 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3404 replies
  • 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
  • 283 replies
  • January 14, 2022
Naveen B wrote:

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
  • 3404 replies
  • January 14, 2022

@Ivan Most Welcome :-) 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings