How to Add Signature Workflow in Journal Entry Screen

By | August 30, 2023

The Signature Workflow is a feature provided by Sage that enables automatic signatures for records that are either modified or created by the first-level user defined in the Assignment rule. Once the user signs the record, the status changes to “Signed” for that user, and the record is then passed on to the next level of users for signature, as defined in the Assignment rule.

For one of our clients, we have configured a Signature Workflow for the Journal Entry screen in Sage X3. This workflow allows approval by any user defined in the Assignment rule. To achieve this, we introduced a field labeled ZAPPFLG (Signed) within the Journal Entry header screen. We then implemented the corresponding code in the SPEGAS script. Upon approval, the ZAPPFLG field is updated with a value from the local menu 280, where the values signify: 1: No, 2: In part, 3: In full, 4: Not managed, 5: Automatic.

Note: The Local Menu description may change based on the patch of X3.

New Stuff: Validation on Company name and GST number fields

Fig1 JV hearder screen
Fig1 JV hearder screen

Follow the below steps to achieve the above requirement :
Create the main Workflow for Custom JV signatures management.

Step 1:
-All -> Setup -> Workflow -> Workflow Rules
-Create a Workflow rule with code ZJVSIG (Create the duplicate of any standard workflow Ex: POHSIG and change required details) as below:

Fig2 ZJVSIG
Fig2 ZJVSIG

Step 2:
-Create a Data Model with Template Code: ZJVSIG (Journal Entry)
-In the Links tab -> Main table as GACCENTRY.

Fig3 ZJVSIG Data Model
Fig3 ZJVSIG Data Model

Step 3:
-Create an Assignment Rule with ZJVSIG (Custom Journal Entry Assignment rule).

Fig4 ZJVSIG Assignment Rule
Fig4 ZJVSIG Assignment Rule

-Data Model as ZJVSIG.
-Click on values and assign the Assignment Rule as ZJVSIG.
-Keep the number of users for approval in the Number of Signatures field.
-Add the [F:HAE]TYP in the Criteria field for the JV type condition.
-In the Values section input the user’s codes.

Step 4:
-Add the below header conditions for the workflow to be triggered.

Fig5 Header condition
Fig5 Header condition

Step 5:
-Add Recipients in the Recipient tab and select “Yes” in the Send mail field and “With signature” in Milestone field. (Added condition “1=2” as the client doesn’t want to send mail to any user.)

Step 6:
-Set below in the Message Tab:
-Select Any in the Management section
-Check Return Icon
-Enter the return function as SPCE

Step 7:
-Add below in the Context field of the Milestone Tab:
[F:HAE]TYP
-Add the below details in the Answers of Milestone:

Fig6 Milestone Answers
Fig6 Milestone Answers
Fig7 Milestone1
Fig7 Milestone1

Create a workflow for Purchase Price No rule notification.
Step 1 :

Create a Workflow rule with ZJVHSIGNCR (Create the duplicate of any standard workflow Ex: POHSIGNCR and change the required details)
-Event code as ZJVSIG
-Set the below conditions in the header:
S_ABREV=”GAS”
[F:HAE]ZAPPFLG=1

Create a workflow for Custom JV signature.
Step 1:

Create a Workflow rule with ZJVSIGVAL (Create the duplicate of any standard workflow Ex: POHSIGVAL and change the required details)
-Event code as ZJVSIG
-Set the below conditions in the header:
S_ABREV=”GAS”
[F:HAE]ZAPPFLG=2

Creating a workflow for Custom JV Signature notification.
Step 1:

-Create a Workflow rule with ZJVSIGNOT(Create the duplicate of any standard workflow Ex: POHSIGNOT and change required details)
-Keep the event type as Signature.
-Event code ZJVSIG, which is the main workflow code.
-Operations as VAL for Accept.
-Set the below conditions in the header:
S_ABREV=”GAS”
[F:HAE]ZAPPFLG=1

Creating a workflow for Custom JV rejection.
Step 1:

-Create a Workflow rule with ZJVSIGREJ(Create the duplicate of any standard workflow Ex: POHSIGREJ and change required details)
-Keep the event type as Signature.
-Event code ZJVSIG, which is the main workflow code.
-Operations as REJ for Accept.
-Set the below conditions in the header:
S_ABREV=”GAS”

Creating a workflow for Custom JV signature cancellation.
Step 1:

-Create a Workflow rule with ZJVSIGCAN(Create the duplicate of any standard workflow Ex: POHSIGCAN and change required details)
-Keep the event type as Miscellaneous.
-Event code CAN, which is the main workflow code.
-Set the below conditions in the header:
[F:AWS]ABROBJ=”GAS”

We’ve added the 4GL code in SPEGAS scripts to set the ZAPPFLG fields as blank in case of entry creation and modification.