
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I had written a script to send email when a request go into a state, However, the APPLY_FOR_MACHINE field is a multi select picklist field.
If a user only select one option, then the email will went out well however if there is multi selection then the email will be a mess.
var email = new Email();
email.to = 'Tommy@xxx.com, Chris@xxx.com';
email.cc = 'Carol@xxx.com';
email.subject = 'Spare Equipment Part Release Alert '+item.REQUEST_NUMBER+ ' '+item.APPLY_FOR_MACHINE+' ';
email.body = '<html><body><p><span style="color:blue;font-weight:bold;font-size:25">Workflow Notification</span></p>Hi Tommy and Chris,</br><br>'+item.REQUEST_NUMBER+' '+item.APPLY_FOR_MACHINE+', has been placed for release by '+item.master.owner.firstName+' '+item.master.owner.lastName+
'<br/><html><body><br><div style="text-align: left; padding-left: 200px"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="https://memjet.autodeskplm360.net/workspace#workspaceid=88&dmsid=' + dmsID +
'&tab=itemdetails">Click link to view Item Details for ' + item.descriptor.descriptor + '';
email.send(); //send email to user
Solved! Go to Solution.