On a custom event I have the following online SQL to trigger an Email on release of a purchase order.
But the records in Curser is not picking on email body.
Declare
CURSOR EXIST_A IS
SELECT p.note_text ,p.currency_code , p.total_amt_at_auth
FROM IFSAPP.PURCHASE_ORDER p
WHERE p.order_no = '&NEW:ORDER_NO'
;
Begin
FOR REC_ IN EXIST_A LOOP
IFSAPP.Command_SYS.Mail(
'noreply@xxxxx.lk' ,
'kavindu@xxxxx.lk',
'Dear Sir Madam <br>
<br>
<br>
New Order has been released.
<br>
<br>
Supplier: &SUPPLIER <br>
PO_Note(s): REC_.note_text <br>
Amount : REC_.total_amt_at_auth - REC_.currency_code <br>
<br>
<br>
If you need further clarifications, please call the respective officer who is handling your account or email your queries to payment@empire.lk
<br>
Thank You
<br>
This is a System generated E-mail. Do not Reply',
'Error Ocured while sending Email',
null, null,
'Cheque in progress - &SUPPLIER ',null,null,null,null,'MAIL_SENDER2');END LOOP;
End;
Email gets created as below. (Highlighted are the curser records)
Looking for a lead.
Thanks in advance.