Skip to main content
Solved

Extract Cash Account Value

  • January 26, 2022
  • 2 replies
  • 93 views

Forum|alt.badge.img+2

Hi,

I need to extract cash Account value, which is 10600

However in code, in all entities with which I am wotking : APRegister, APPayemt, APAdjust - I can only extract its interal id - 978

How to extract it’s value ?

Best answer by Naveen Boga

Hi @Ivan  The APPayment table will store only CashAccountID value but not the CashAccountCD, if you wanted to get the CashAccountCD make a simple BQL to CashAccount table and fetch the CashAccountCD.

CashAccount objCashAccount = PXSelect <CashAccount,Where<CashAccount.cashAccountID,Equal<Required<CashAccount.cashAccountID>>>>.Select(new PXGraph(), payment.CashAccountID);


string accCode = objCashAccount.CashAccountCD;

 

I hope you have completed Application Developer certifications training, If NOT, I would highly recommend you to go through it to get great a knowledge about the customizations.

Here is the Link: https://www.acumatica.com/acumatica-developer-training/development/

 

 

2 replies

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

Hi @Ivan  The APPayment table will store only CashAccountID value but not the CashAccountCD, if you wanted to get the CashAccountCD make a simple BQL to CashAccount table and fetch the CashAccountCD.

CashAccount objCashAccount = PXSelect <CashAccount,Where<CashAccount.cashAccountID,Equal<Required<CashAccount.cashAccountID>>>>.Select(new PXGraph(), payment.CashAccountID);


string accCode = objCashAccount.CashAccountCD;

 

I hope you have completed Application Developer certifications training, If NOT, I would highly recommend you to go through it to get great a knowledge about the customizations.

Here is the Link: https://www.acumatica.com/acumatica-developer-training/development/

 

 


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

Hi @Ivan  The APPayment table will store only CashAccountID value but not the CashAccountCD, if you wanted to get the CashAccountCD make a simple BQL to CashAccount table and fetch the CashAccountCD.

CashAccount objCashAccount = PXSelect <CashAccount,Where<CashAccount.cashAccountID,Equal<Required<CashAccount.cashAccountID>>>>.Select(new PXGraph(), payment.CashAccountID);


string accCode = objCashAccount.CashAccountCD;

 

I hope you have completed Application Developer certifications training, If NOT, I would highly recommend you to go through it to get great a knowledge about the customizations.

Here is the Link: https://www.acumatica.com/acumatica-developer-training/development/

 

 

Hi @Naveen B 

Thank you for the provided material