Tuesday, March 4, 2014

Schedule a process using peoplecode

You can do this within an App Engine Program or even by placing a push button with FieldChange peoplecode.
Local ProcessRequest &RQST;
Local string &Subject;
Local string &Text;
&Subject = "Subject of Email";
&Text = "This text will be displayed as the text of this email ";
&RQST = CreateProcessRequest();
&RQST.RunControlID = "MYRUNCONTROL_ID";
&RQST.ProcessName = "PROCESSNAME";
&RQST.RunLocation = "PSNT";
&RQST.ProcessType = "SQR";
&RQST.OutDestType = "Email";
&RQST.OutDestFormat = "PDF";
&RQST.OutDest = "User : PS,Role : PeopleSoft User";
&RQST.EmailSubject = &Subject;
&RQST.EmailText = &Text;
&RQST.EmailAttachLog = False;
&RQST.Schedule();

No comments:

Post a Comment