Query statement of 'Get BP Code of last AR Invoice'
I have the query for A/P Invoice to show the last A/P BP when I click Shift + F2. The statement in Query is as follows:
Select T0.CardCode from OPCH T0 where T0.DocNum = $[$8.0.Number] - 1
Could anybody tell me what the statement would be if I want to have the last A/R BP automatically show in A/R Invoice when I click Shift + F2?
Try this one:
Select T0.CardCode from OINV T0 where T0.DocNum = $[$8.0.Number] u2013 1