email is not populating in dictionary default value
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2023 07:46 AM
hi team, i want to populate email in string field from assigned_to email, i am trying below script in dictionary default value.. please suggest
var assignedUserEmail = '';
//if (current.assigned_to && current.assigned_to.email) {
assignedUserEmail = current.assigned_to.email;
//}
return assignedUserEmail;
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2023 08:28 AM - edited ‎08-21-2023 08:29 AM
@Deepthi13 I believe it is having trouble with the dot walking. Please try this:
var assignedUserEmail = '';
if (current.assigned_to) {
var user = new GlideRecord('sys_user');
if(user.get(current.assigned_to)){
if(user.email){
assignedUserEmail = user.email;
}
}
}