Hi,
I´m trying to set an approval procedure on SAP Business One using the query:
SELECT Distinct 'TRUE'
FROM ORDR T0 INNER JOIN OCRD T1 ON T0.[CardCode] = T1.[CardCode] INNER JOIN RDR1 T2 ON T0.[DocEntry] = T2.[DocEntry] INNER JOIN ITM1 T3 on T2.[ItemCode] = T3.[ItemCode] AND T1.[ListNum] = T3.[PriceList] where T2.[Price] < T3.[Price]
But it always returns "TRUE", I guess that's because the order number is not set but here is my question How do I set the order number if it's being created? or how can I set a
query for an approval procedure?
Thanks for your help