How to access variable set value in business rule ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2022 11:19 PM
Hi experts,
i have created the record producer and after submit it. it shown in fetched table ticket... based on insert into the table i want to access the variable set value and triggerd the notification but after inset business rule ..im not able to access the variable set value...it showing 'undefined'.
please provide solution
Thank you
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2022 11:53 PM
Hi,
can you share what script you are using in notification to print variable value?
notification is on which table? it's screenshots etc
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 01:03 AM
var test= current.variables.standard_employee_questions.requested_for;
var test3=current.variables.standard_employee_questions.needed_by;
var email='rinable1290@umcs.in';
if(test=='Yes' || test3=='Yes'){
gs.eventQueue('event_ns_notification',current,email,'');
}
i have used current.variables.field_name as well but its return always 'undefined'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 01:16 AM
Hi,
you didn't provide complete details
notification is on which table? where are you writing this script
As an alternative you can query question_answer table with current record sys_id and then get details
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 02:10 AM
u_cssc table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 02:20 AM
Hi,
Can you share complete email script?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader