Hi I want to pass a sys id as sys property name in email script glide record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2023 02:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2023 02:43 AM
Create a system property and store sys_id in it and call it in email script using gs.getProperty('property_name')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2023 02:46 AM
Hi @rajeshKongamudi ,
I trust you are doing great.
To pass a sys ID as the sys property name in a GlideRecord's addQuery method, you can use the following code:
var sysId = '<your_sys_id>'; // Replace <your_sys_id> with the actual sys ID you want to use
var gr = new GlideRecord('<table_name>'); // Replace <table_name> with the name of the table you want to query
gr.addQuery('sys_id', sysId);
gr.query();
var ccList = [];
while (gr.next()) {
// Retrieve the group members and add them to the ccList array
var member = gr.getValue('<cc_field_name>'); // Replace <cc_field_name> with the name of the field containing the group members' sys IDs
ccList.push(member);
}
// Use the ccList array to pass the group members in the cc when the notification triggers
// Add your notification logic here
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2023 02:47 AM
You can use email script to add CC to you email notification. In email script you can fetch system property by using gs.getProperty method