Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2022 11:26 PM
hi team,
i am trying below script in flow designer "send email" but showing some error like below please suggest to debug this what is the issue.
Error: "fd_data" is not defined.,Detail: "fd_data" is not defined.
Code:
/*
**Access Flow/Action data using the fd_data object. Script must return a value.
**example: var shortDesc = fd_data.trigger.current.short_description;
**return shortDesc;
*/
var body;
body += 'Hello, <br/><br/>';
body += 'Requested For: ' + fd_data._1__get_catalog_variables.requested_by+"<br/>" ;
body += 'New User: ' + fd_data._1__get_catalog_variables.new_user_user_not_listed + "<br/>" ;
body += 'Requested By: '+ fd_data._1__get_catalog_variables.requested_by.getDisplayValue() + "<br/>" ;
body += 'Supervisor: '+ fd_data._1__get_catalog_variables.supervisor_name.getDisplayValue() + "<br/>" ;
body += 'Business Unit:'+ fd_data._1__get_catalog_variables.business_unit.getDisplayValue() + "<br/>" ;
body += 'Cost Center: ' + fd_data._1__get_catalog_variables.cost_center.getDisplayValue() + "<br/>" ;
body += 'Cost Center Name: ' + fd_data._1__get_catalog_variables.cost_center_name + "<br/>" ;
body += 'Username: ' + fd_data._1__get_catalog_variables.network_id + "<br/>" ;
body += 'Action: ' + fd_data._1__get_catalog_variables.action + "<br/>" ;
body += 'Location: ' + fd_data._1__get_catalog_variables.location + "<br/>" ;
body += 'ipad required: ' + fd_data._1__get_catalog_variables.ipad_required + "<br/>";
body += 'Planon Business Unit: ' + fd_data._1__get_catalog_variables.planon_business_unit.getDisplayValue() + "<br/>";
var gr1 = new GlideRecord("u_variable_choice_list");
gr1.addQuery("sys_id",fd_data._1__get_catalog_variables.add_role);
gr1.query();
if(gr1.next()){
addRoles = gr1.u_value;
}
body += "Add Role: "+addRoles+"</br>";
var remRoles = "";
var gr2 = new GlideRecord("u_variable_choice_list");
gr2.addQuery("sys_id",fd_data._1__get_catalog_variables.remove_role);
gr2.query();
if(gr2.next()){
remRoles = gr2.u_value;
}
body +="Remove Role: "+remRoles+"</br>";
body += 'Justification / Additional Comments: '+ fd_data._1__get_catalog_variables. justification_additional_comments
+ '<br /><br /> Thanks';
return body;
Error:
Solved! Go to Solution.
Labels:
- Labels:
-
Multiple Versions
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2022 11:38 PM
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2022 12:47 AM
So what was the suggestion which worked for you?
Can you share that?
Regards
Ankur
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2022 12:01 AM
Hi,
So at which line it is failing?
Regards
Ankur
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader