Friday 27 June 2014

Send Mail and TriggerBusinessEvent Function in PeopleSoft


Send Mail Function


&RET = SendMail(&MAIL_FLAGS, &MAIL_TO, &MAIL_CC, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TEXT, &MAIL_FILES, &MAIL_TITLES, &MAIL_FROM, &MAIL_SEP, &CONTTYPE, &REPLYTO, &SENDER);
&MAIL_FLAGS = 0;
&MAIL_TO = "abc@def.com";
&MAIL_CC = "";
&MAIL_SUBJECT = "Helpdesk ID : " | " " | REQ_HDR_VW.REQ_ID;
&MAIL_TEXT = "Hi Team," | Char(10) | Char(10) | "This is automatically generated helpdesk id for:" | Char(10) | "Requisition ID:" | REQ_HDR_VW.REQ_ID | " " | Char(10) | "Business Unit:" | REQ_HDR_VW.BUSINESS_UNIT | Char(10) | "Requisition raised by" | ": " | REQ_HDR_VW.REQUESTOR_ID | Char(10) | "Requestor Name: " | &name | Char(10) | "Requestor Emailid: " | &emailid | Char(10) | Char(10) | "Item:" | TB_REQ_DESC_WRK.COMMENTS | Char(10) | Char(10) | "Approximate Amount:" | REQ_APPROVAL_WR.MERCH_AMT_TTL_BSE | Char(10) | Char(10) | "Aptara Helpdesk ID and Comments:" | Char(10) | REQ_APPROVAL_WR.COMMENTS | Char(10) | "Req. line comments:" | TB_REQ_DESC_WRK.COMMENTS_2000;
&MAIL_FILES = "";
&MAIL_TITLES = "";



TriggerBusinessEvent

      &RTN = TriggerBusinessEvent(BusProcess."REQ_NOTIFICATION", BusActivity."Notify Requester", BusEvent."Amount Approved");