
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2016 12:51 AM
Hi Guys,
One Quick Question for all.
I want to open outlook from UI action.
I am able to do it by using following code.
gs.setRedirect("mailto:"+current.approver.email);
Now my question is:
1) How to set body of the mail?
2) How to Set Subject of the Emai?
3)Can i call email template in this?
4) What about watermark?
I saw some of the Post.
It says that we have to write code on sys_email which sets watermark of the email.
I want a body of email and Links to approve and reject.
Thanks In Advance.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2016 01:31 AM
I got it....i did some modification i code and i got it.
Thank You Pradeep for your quick response...
Below is Correct code:
var subject='Re:'+current.sysapproval.getDisplayValue()+'- approve';
var gr = new GlideRecord('sys_watermark');
gr.addQuery('source_id.number',current.sysapproval);
gr.query();
if(gr.next())
{
var ex = gr.number;
gs.addInfoMessage('aSHU' + ex);
}
gs.setRedirect("mailto:ashu@example.com?subject="+subject+ "&body=" +ex+ '');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2016 12:54 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2016 01:23 AM
I did this only but my question is:
How to set body of a mail

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2016 01:29 AM
Hi Pradeep,
See below code i have done a bit on it.
I am getting Subject line good. i am able to set mail id also, but issue is with how to set Body of the email, see screen shot attached.
var subject='Re:'+current.sysapproval.getDisplayValue()+'- approve';
var gr = new GlideRecord('sys_watermark');
gr.addQuery('source_id.number',current.sysapproval);
gr.query();
if(gr.next())
{
var ex = gr.number;
gs.addInfoMessage('aSHU' + ex);
}
gs.setRedirect("mailto:ashu@example.com?subject="+subject+"body="+ex+'');
See i want that watermark number in body but it is giving me problem.....
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2016 01:31 AM
I got it....i did some modification i code and i got it.
Thank You Pradeep for your quick response...
Below is Correct code:
var subject='Re:'+current.sysapproval.getDisplayValue()+'- approve';
var gr = new GlideRecord('sys_watermark');
gr.addQuery('source_id.number',current.sysapproval);
gr.query();
if(gr.next())
{
var ex = gr.number;
gs.addInfoMessage('aSHU' + ex);
}
gs.setRedirect("mailto:ashu@example.com?subject="+subject+ "&body=" +ex+ '');