Hi, I am doing a GI to show the GL accounts for NonStock Items.
The NS Items are tied to a posting class. The posting class can use the default of Inventory Item (I) or Posting Class (P)
I am trying to get the GL account to be in one column.
My data field looks like this:
=iif ( [INPostClass.InvtAcctDefault]='I', [InventoryItem.InvtAcctID], [INPostClass.InvtAcctID])
The GI is returning 2037 instead of the GL#, 11302.
Is there a function or a way to get the 11302( The GL from the chart of accounts) to display?
Thank you,
Bill
Answer
How to get the Acumatica not SQL GL account code in a GI
Best answer by nhatnghetinh
Hi wfilipiak67,
I think ‘2037’ is AccountID and ‘11302’ is AccountCD. So you need to do left join with Account (PX.Objects.GL.Account) to get AccountCD.
- RELATIONS TAB: Left join [InventoryItem.COGSAcctID] = [InventoryItem.AccountID]
- RESULTS GRID: Expense Account: iif ( [InventoryItem.COGSAcctID] = [Account.AccountID], [Account.AccountCD], null)
Please see the attachment for more details.
NNT
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.