catalog task notification link should redirect to request form

Yasin Shaik11
Tera Contributor

Hi,

Need help for the below requirement 

I have created a notification on the sc_task table in the body of the notification one link should be present whenever user click on that link it should re direct to request form which is associated with that task. 

 

Thanks in advance 🙂 

6 REPLIES 6

Musab Rasheed
Tera Sage
Tera Sage

Hi Umar,

Try this in notification. Mark my answer as correct if that helps.

RITM: ${request_item.URI_REF}

Please hit like and mark my response as correct if that helps
Regards,
Musab

Hi Rasheed,

 

I tried this not working. any other ways Do we have ? 

I Tried and it's working see below.

find_real_file.png

Click here to view Task: ${URI_REF}
RITM Link : ${request_item.URI_REF}

 

Please hit like and mark my response as correct if that helps
Regards,
Musab

Guna Shalini M
Tera Expert

Try creating a mail script with reference to the code below and include it in the Message HTML of your notification with the format like Link : ${mail_script : <script_name>}. 

 

(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
          /* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
          /* Optional GlideRecord */ event) {

          // Add your code here link added
	var baseLink = gs.getProperty('glide.servlet.uri') + 'ssp?id=ticket&table=sc_req_item' + '&sys_id='+ current.sys_id;
/*var baseLink = gs.getProperty('glide.servlet.uri') + 'sp?'+'id=sc_request'+'&table=sc_req_item'+ '&sys_id=' + current.getValue('sys_id');*/
			template.print('<a href="'+baseLink+'');
			template.print('">');
			template.print(gs.getMessage(current.number));
			template.print('</a>');
})(current, template, email, email_action, event);

As per the code, the link will be displayed with the RITM number and on clicking it, you will be redirected to the link.

Please mark my answer as Helpful, if it helps

Thanks