Question

Event Action

  • 18 February 2020
  • 3 replies
  • 372 views

Badge +2

Hello,   I’m trying to create an event Action to alert the buyer when a Reschedule_date is entered but only if the date is different than the Promise_Date.  I’m using the Purchase_order_line.   CAn this be done? 

 

 

 


3 replies

Userlevel 7

You’ll have to add it to the code e.g.

BEGIN

IF ‘&NEW:RESCHEDULE_DATE’ != ‘&NEW:PROMISED_DATE’ THEN 

do something

END IF;

END;

Badge +2

Thank you for the reply. 

I have an Event that captures what I need on the email Notification -  when a date changes execute Action 1

Action 1 was to send an email stating a date was changed. I now need to add a condition before the email is sent, which is the IF statement you sent above. 

Do I now create another Action?  Action 2 - which has the Execute Online SQL - 

The “do something” is send the Email in Action 1.   Thanks for your help. 

 

 

Userlevel 7

Thank you for the reply. 

I have an Event that captures what I need on the email Notification -  when a date changes execute Action 1

Action 1 was to send an email stating a date was changed. I now need to add a condition before the email is sent, which is the IF statement you sent above. 

Do I now create another Action?  Action 2 - which has the Execute Online SQL - 

The “do something” is send the Email in Action 1.   Thanks for your help. 

 

 

You could do something like this in an Execute Online SQL event action. 

BEGIN
IF '&NEW:RESCHEDULE_DATE' != '&NEW:PROMISED_DATE' THEN
THEN command_sys.Mail(
from_user_name_ => 'ifsapp',
to_user_name_ => 'someone@example.com',
subject_ => 'Date has changed for Purchase order: &NEW:PURCHASE_ORDER_ID',
text_ => 'Purchase order: &NEW:PURCHASE_ORDER_ID has changed. New reschedule date is &NEW:RESCHEDULE_DATE. Promised date is: &NEW:PROMISED_DATE'
);
END IF;
END;

 

Reply