Thursday 1 September 2011

AWE – eMail Template SQL Object(s)

You must create SQL Object(s) if you wish to use binds values in your email notifications.


Below is an example of how a SQL object can be created to populate an email template:


SELECT A.TRANSACTION_NBR


,A.EMPLID


,B.NAME


,A.TRANS_DT


FROM PS_EXP_RPT_HDR A


,PS_PERSON_NAME B


WHERE A.EMPLID = B.EMPLID


AND A.LINEID =:2


In this example, the AWE will look to populate the %2 bind with TRANSACTION_NBR, the %3 bind with EMPLID, the %4 bind with NAME, and the %5 bind with TRANS_DT. Also note the “:1” bind in the where clause of the SQL Object. It is  mandatory requirement to have all of the keys from your header record (or line level record depending on the notification) bound into the where clause. The AWE uses the header record keys to retrieve the correct row from the SQL Object.


No comments:

Post a Comment