Added trigger code

 2 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
andrew
New Member Send Private Message
Posts: 0
New Member

Has anyone added code before to activate triggers ?

where does this comand go ?

 

<!--[if gte mso 9]> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; color:windowtext;} p {mso-style-priority:99; mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; color:black;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> <!--[if gte mso 10]> ProcessFlow basic trigger code is designed to simplify the creation of application trigger code.

The following statement is needed to open the ProcessFlow files in the LOGAN database:

PERFORM 1000-OPEN-WORKFLOW-DB

The PERFORM 1000-OPEN-WORKFLOW-DB statement must be performed prior to any of the other ProcessFlow APIs. It cannot be performed while in transaction state. In other words, it must be performed prior to performing “910-AUDIT-BEGIN.”

The placement of the PERFORM 1000-OPEN-WORKFLOW-DB statement varies by the type of program or code where the statement will reside:

Deleted User
New Member Send Private Message
Posts: 0
New Member

This command should be the first line of any trigger you create.  Think of it like the OPEN command for files. 

Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
I think you will find it already exists in many Lawson delivered code. For instance in PO20, it is one of the first lines of executable code:

******************************************************************
PO20S1-TRANSACTION SECTION.
******************************************************************
PO20S1-START.

PERFORM 1000-OPEN-WORKFLOW-DB.

IF (ERROR-FOUND)
MOVE CRT-ERROR-CAT TO PO20F1-PO-ERROR-CAT
GO TO PO20S1-TRANSACTION-END.

If you are developing a custom code, this should probably be in the PD file as one of the first statements.