cancel
Showing results for 
Search instead for 
Did you mean: 

Approval query is not being triggered

former_member277944
Participant
0 Kudos

Hello Experts,

Scenario: I would like to send my Sales Order in approval only when Business Partner "C00282" is selected in Sales Order. I am using the following query but approval is not being triggered:

SELECT DISTINCT 'TRUE' FROM ORDR Where $[ORDR.CardCode.0]= 'C00282'

help required !

Thanks & Regards,

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Try $[ORDR.CardCode] instead of  $[ORDR.CardCode.0]

2nd, Use IF checks, like IF ($[ORDR.CardCode] = 'C00282') Select 'TRUE' from ORDR

Former Member
0 Kudos

Hi,

Discard above query...

this one works.

IF ($[ORDR.CardCode]='C00282')

SELECT 'TRUE'

Former Member
0 Kudos

Hi Shazad,

The same query is working in My DB.

Please check whether you have selected 'Sale order' in Documents Tab of Approval template and check you have given correct card code and this approval template is Active

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Try this:

SELECT distinct 'true' FROM ORDR T0 WHERE $[$4.0.0] = 'C00282'

OR

SELECT distinct 'true' FROM ORDR T0 WHERE $[ORDR.cardcode] = 'C00282'

Thanks & Regards,

Nagarajan

former_member277944
Participant
0 Kudos

Thanks for reply, I have tried the query that you mentioned but it doesn't work.

I have even tried by just writing the following in query and save it but still the approval is not being triggered.

SELECT 'true'

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

The above query is working for me. How did you assign above query in approval template?

Thanks & Regards,

Nagarajan

former_member277944
Participant
0 Kudos

I have tried the same template by selecting the option: Launch Approval Procedure - > Always. It works fine. But when I try the option When the Following Applies, and select the query (see pic below), it does not work.

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please post your query here.

Thanks & Regards,

Nagarajan