Scheduling process(SQR or AE) using PushButton



Insert a PushButton in to a page in FieldChange event code the following code...
Note : Here we need to assign a field name and a record name to a PushButton in its properties to make use of FieldChange event,so create a work record with one field and assign the same to this button.
So whenever user click on the button its respective process will be scheduled,to view the statues of the process which is scheduled go to PeopleTools - Process Scheduler - Process Monitor
-----------------------------SQR Process--------------------------------------------
Local ProcessRequest &RQST = CreateProcessRequest();
&RQST.RunControlID = "1";
rem Run_cntl_id is mandatory; process instance is not mandatory;
&RQST.ProcessType = "SQR Report";
&RQST.ProcessName = "ISTEMP1";
&RQST.Schedule();

If &RQST.Status = 0 Then
   MessageBox(0, "", 17125, 14, "Scheduling SQR.");
End-If;
-------------------------AE Process--------------------------------------------------


Local ProcessRequest &MYRQST;

&MyAppName = "IS_OUTBND_AE";
&MYRQST = CreateProcessRequest("Application Engine", &MyAppName);
&MYRQST.RunControlID = "1";

&MYRQST.Schedule();
------------------------------------------------------------------------------------------

1 comment: