Connection between PMTran and APTran

  • 24 April 2023
  • 6 replies

Userlevel 7
Badge +9

Hello Community,


I need to Join PMTran and APTran. My understanding is the below join should work but when I compare some of the transactions which are generated from AP, their LineNbr doesn’t agree to OrigLineNbr in PMTran. Below is the query I need, which is a simple one but not sure why LineNbr field doesn’t align. 

                var tran = SelectFrom<PMTran>

If this is not the right join, then what is it?


Best answer by aaghaei 25 April 2023, 01:25

View original

6 replies

Userlevel 7
Badge +18

Hi @aaghaei  I did not check but may work, can you check this please?


var Details = new PXSelectJoin<PMTran,
InnerJoin<ARTran, On<ARTran.tranType, Equal<PMTran.aRTranType>,
And<ARTran.refNbr, Equal<PMTran.aRRefNbr>,
And<ARTran.lineNbr, Equal<PMTran.refLineNbr>>>>>,
Where<PMTran.aRTranType, Equal<Required<PMTran.aRTranType>>,
And<PMTran.aRRefNbr, Equal<Required<PMTran.aRRefNbr>>>>,


Userlevel 7
Badge +9

Thank you @Naveen Boga 

the code you provided joins the AR but I need to join APTran to PMTran. The join you provided links the invoices which are generated from PMProforma Invoices to PMTran

Userlevel 7
Badge +18

Oops...Sorry,@aaghaei  I thought it was for ARTran. 

Let me check for APTran and let you know If I found anything.

Userlevel 7
Badge +9

Thanks @Naveen Boga Appreciate your time pal

Userlevel 7
Badge +9


I ended up with the below query and so far it has passed all my tests.

PXResultset<PMTran> actual = SelectFrom<PMTran>


Userlevel 7

Thank you for sharing your solution with the community @aaghaei !


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