How to create a change request reminder

jmbrake
Kilo Expert

Our team would like to be reminded of an upcoming change that is assigned to them and they would like to see it 30 minutes prior to that date and time.   How do you perform this?   Are there examples out there?   I am very new to ServiceNow, so please provide as much detail as possible.   I thank you in advance.

1 ACCEPTED SOLUTION

Hi Joan,


Your business rule looks to be set to populate the Reminder date field, but only if the start date is filled in with a value.   I would change the business rule to the planned end date value (current.end_date), and then enter a date value in this field to test your business rule.   If it works, then the business rule should enter the reminder value to be 30 minutes (-1800) from the planned end date.



Thanks,
David


View solution in original post

44 REPLIES 44

Hi Joan,


I noticed that the business rule is set to only run after the record is inserted.   You will want to check "Update", so that it is run after the record is updated as well.


I actually did have that checked and it still does not send a reminder.




001.png@01CF7692.0E5380D0


Hi Joan,


I'm sorry, but it wasn't in your image from earlier today.   The last question is what you have set for the email notification itself that should get kicked off if the business rule and event are synchronized.   What do you have set for the 'who will receive' rules on the notification?   For instance, the instructions you were provided earlier shows that the assigned_to value is entered in the Users field.   However, if no one is assigned to the change request, then the email will not be sent.



Thanks,


David


Here is everything I have done so far with screen shots.





Change Control Reminder 30 Minutes Prior to Change



Friday, May 23, 2014



2:17 PM





1. Create one new field on Change request table as 'Reminder(u_reminder)'.


· From Change Form, right click and select Personalize - Form Layout


· In the new Create New Field, type: Reminder


· Make the field a Date/Time


· Click Add and it will be added to bottom of selected fields




· enerated alternative text: Entry Column nam8 Max lengthL Reference typ8 Choic8 Required field ...





2. Add one BR on Change Request table - After Update


· From Change Form, right click, select Personalize - All


· Select the Business Rules Tab and Choose New


· Name the Business Rule: Change Request Reminder


· Check Active


· Check Update


· Adjust the time (-1800) to the number of seconds you want the alert to pop up at





Enter this line in the condition field: current.u_planned_start_date.changes() && current.u_planned_start_date != ''





Script:



var gdt = new GlideDateTime(current.u_planned_start_date);



gdt.addSeconds(-1800);



current.u_reminder = gdt.getValue();





[Machine generated alternative text: Rule Change Request Reminder Change Request (change requestl Client callab18 Activ8 ConditiorL current start datechangesO current start date " gdt GI i deDateTime(current. start_date); gdt. addSeconds(- current. u_remi nder - gdt. getVaI ue();]





3. Create one event as 'change.reminder' through event registry.




· Type Event in the "Type Filter Text"


· Select Registry


· Create a New Registry


· Give it the name: change.reminder


· Select the Table: Change Request




· enerated alternative text: Registration Event nam8 DescriptiorL Change Request (change requestl ...





4. Create one BR on Change Request table




· From Change Form, right click, select Personalize - All


· Select the Business Rules Tab and Choose New


· Name the this one: Change Reminder Rule


· Check Active


· Check Insert and Update


· Enter this statement in the condition box: current.u_reminder.changes()


· Enter this in the Script box: gs.eventQueueScheduled("change.reminder", current, gs.getUserID(), gs.getUserName(), current.u_reminder);





[Machine generated alternative text: Rule Change Request (change requestl gs. getLlserID() , gs. getLlserName() , current. u_remi nder); Client callab18 current, Activ8 ConditiorL gs. currentu reminderchangesO eventQueueScheduI remi nder"]





- After Insert & Update



Condition - current.u_reminder.changes()





Script:



gs.eventQueueScheduled("change.reminder", current, gs.getUserID(), gs.getUserName(), current.u_reminder);





5. Create a normal notification but have the following fields populated:




· From Change Form, right click, select Personalize - All


· Select the Business Rules Tab and Choose New


· Select the Email Notifications Tab


· Create a new Notification







Send When: Event is fired.



Event Name: change.reminder





enerated alternative text: Notification (Advanced view* I Chan e Reminde Change Request (change re...





enerated alternative text: When to send Who will receive What it will contain Who will receive Us...





enerated alternative text: When to send Who will receive What it will contain $(shon description) ...


Hi Joan,



You have followed the correct steps.


Now, to complete the testing, p



lease go to any Change Request:



1. Update the 'Start Date' field with the date and time 35 minutes from the current time and update the change request.


      (E.g: If the current time is '



23/5/2014 14:55', then put the start date as '23/5/2014 15:30'.



2. Now, go to 'System Logs -> Events' and search for 'change.reminder' event which we have created newly.


      If you can find it in the logs here, we're on track.


      If the event is there, it will be in 'ready' state.



3. At   '23/5/2014 15:01', you'll be able to see the event state changed to 'Processed'.


4. Go to the email notification we have created, and check 'Send to event creator' checkbox to true and save the notification.



If we're on track, you should be able to see our reminder notification   in the 'System Mailboxes -> Outbox' or   'System Mailboxes -> Sent'.




All the best!



Please let me know the results of the following troubleshooting steps.





Regards,


Solutioner


Logo.png


Enhance Knowledge NOW@ www.solutioningnow.com


http://www.solutioningnow.com/