HTML Script field type for custom tables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2018 10:01 AM
Hi Folks,
I want to create a similar functionality what we have for Email Notification when typing message HTML in other table
So I have created the field type HTML Script and made it dependent on other field which is of type Table name, Now i can choose the variables just like in notification for which ever table I select in the table name type field
But my question is that the notification gets the object of the current record and then replaces the variable with their values for example ${assignment_group} gets replaced by Service desk, How will I achieve this for my custom table in scoped application
Already seen this article - https://community.servicenow.com/community?id=community_question&sys_id=ce1303e1dbd8dbc01dcaf3231f96194d
Any help will be appreciated!
Thanks & Regards
Nitish Goel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2019 08:29 AM
Hi Ngo,
I know i am late but i found the solution to your problem.
What i understood from your issue that you are able to make field on your custom table like notification but now you need to trigger notification which takes contents from the custom table field. if my understanding is correct so solution is pretty straight.
Solution: You need to create a email script and call the email script in notification, below is example:
email script:Your_email_script_name
var xyz = current.'your_custom_field';
template.print(xyz);
In Notification:
In Message HTML: ${mail_script:Your_email_script_name}
I hope this will help, we tried and it worked perfectly for our case.
Regards
Gaurav