How to send a notification to a user from a variable on sc_task table?

liam regan
Kilo Contributor

Hi, 

Fairly new to dev on the platform so apologies if this is an easy one. 

I have a requirement to be able to send a notification to a user from a variable in a catalog item? 

e.g. Variable name: 'Contact Person', not shown on the task record, the user in this field needs to receive a notification. 

 

Thanks,

 

1 ACCEPTED SOLUTION

@liam regan 

refer below link where I have explained the approach

How to send notifications to users selected in List collector variables on catalog items

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Narsing1
Mega Sage

Hi,

For this kind of implementation, the best practice is this.

  • Write a before Insert BR to store this information into WatchList variable in RITM
  • On the Notification, "Whom to Send" Tab, add Watchlist as well.
Business Rule

Before Insert
sc_req_item

Script

current.watch_list = current.variables.<contact_person variable>


Notification

Add the watch_list variable on Whom to send


Thanks,

Narsing

Hi Narsing, I dont think It will be possible to use this approach as the watch list is available on the catalog item and so more than just the contact person could be chosen and not all should receive it

Hi,

Got it. But Watch List is available in RITM and Task also.

Thanks,

Narsing