Skip to Content
0

Query in Approval Process not working

Jan 11, 2017 at 05:04 PM

22

avatar image

My query does not seem to be working in Approval Procedure. It returns a 'True' when run in SQL with the actual CardCode of the Sales Order, but in B1, the Sales Order gets saved without the Approval procedure being triggered. The query I am using is given below.

SELECT Distinct 'True'  FROM ORDR T0 WHERE
$[ORDR.CardCode] IN (SELECT T1.CardCode FROM OCRD T1 WHERE (select T1.CreditLine - T1.Balance)  < 0 AND T1.CardType  = 'C' AND T1.GroupNum NOT IN (25, 28, 29, 30, 31) AND T1.CardName NOT LIKE 'One-Time%' AND T1.PymCode <> 'CreditCard' AND T1.QryGroup2='Y'
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ajay Audich Jan 11, 2017 at 05:12 PM
0

A close bracket at the end was missed. Please read the query as

SELECT Distinct 'True'  FROM ORDR T0 WHERE
$[ORDR.CardCode] IN (SELECT T1.CardCode FROM OCRD T1 WHERE (select T1.CreditLine - T1.Balance)  < 0 AND T1.CardType  = 'C' AND T1.GroupNum NOT IN (25, 28, 29, 30, 31) AND T1.CardName NOT LIKE 'One-Time%' AND T1.PymCode <> 'CreditCard' AND T1.QryGroup2='Y')
Share
10 |10000 characters needed characters left characters exceeded