- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2022 12:35 AM
Hi All,
I have a requirement wherein when user is submitting a Service Request, there is a variable named as 'Training Required' if user selects 'Yes' on SR form, it should open email window in outlook and will copy some details from SR form to outlook email and email address in 'To' will be auto-populated with training team's DL.
Has anybody implemented this kind of requirement or any alternate to implement the same.
Thanks,
Anjali
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2022 02:04 AM
Please try the below code, It opens the user's default email client and populates the default values
Make sure "Isolate script" is set to false in the Catalog Client script
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if(newValue == 'Yes'){
var msg = g_form.getValue('q2'); // Please set the right variable name that goes into the email body
window.location.href = "mailto:user@example.com?subject=Subject&body="+msg;
}
}
Result:
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2022 02:04 AM
Please try the below code, It opens the user's default email client and populates the default values
Make sure "Isolate script" is set to false in the Catalog Client script
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if(newValue == 'Yes'){
var msg = g_form.getValue('q2'); // Please set the right variable name that goes into the email body
window.location.href = "mailto:user@example.com?subject=Subject&body="+msg;
}
}
Result:
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2022 02:20 AM
Thanks a ton!!
It helped..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2022 02:29 AM
Glad that it helped you. Please mark my answer correct and helpful if that solves your query which helps the other people having similar question.
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2022 03:35 AM
Hi Vasantharajan,
Can we also auto-populate email body with some predefined template, we do not need any thing from SR but display some predefined data in email body.
Thanks
Anjali