Notifications
Clear all

3697055 - Approval procedure not triggered after editing approved

1 Posts
1 Users
0 Reactions
7 Views
admin
Posts: 587
Admin
Topic starter
(@admin)
Knight3
Joined: 4 years ago

Description

Symptom

Approval conditions fail to retrigger the approval procedure when editing an approved document due to incorrect query syntax implementation. 

Resolution

By design the query automatically reads properties from the currently active window (OINV, ORDR, and so on in case of first approval; ODRF in case of approved documents).

For this reason, if the approval should apply also to approved documents, please follow these requirements:

  • Do not include a FROM table clause
  • Use column syntax instead of table references: For instance, for OINV."CardCode" use: $[$4.0.0], for ODRF."DocTotal" use: $[$29.0.number]

In addition, use IN-clause syntax instead of table JOIN for referencing related data.

Example of correct syntax:

SELECT DISTINCT 'True' 
WHERE $[$4.0.0] IN (
        SELECT T1."CardCode" 
        FROM OCRD T1 
        INNER JOIN OCRG T2 ON T2."GroupCode" = T1."GroupCode" 
        WHERE T2."GroupName" <> 'SAP'
    ) AND $[$29.0.number] > 1

This example triggers approval when:

  • Business partner group is NOT 'SAP'
  • Document total is greater than 1
  • Approval is retriggered when approved documents are modified

See Also


Reply
Share:
x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security