Hi I Have a reqirement , in Knowledgment article state is pending retirement,need to send approval email notification to the Manger,i wrote the business rule for that,but that was not working ,please help on this

Techno Mint
Giga Contributor

Hi I Have a requirement , in Knowledge Management , article state is pending retirement,need to send approval email notification to the Manager,i wrote the business rule for that,but that was not working ,please help on this

find_real_file.png

 

1 ACCEPTED SOLUTION

dmathur09
Kilo Sage
Kilo Sage

Hi Techno,

Can you remove line 4 code, the if condition and make the insert as checked in when to run section.

Let me know if that works for you

Regards,

Deepankar Mathur

View solution in original post

8 REPLIES 8

dmathur09
Kilo Sage
Kilo Sage

Hi Techno,

Can you remove line 4 code, the if condition and make the insert as checked in when to run section.

Let me know if that works for you

Regards,

Deepankar Mathur

Hi Deepak ,

 

Thanks ,it's working, but i have 3 members in group ,if i impersonate with x it shows x name ,but i impersonate with y it shows x name like Hi xxx 

if this error is fixed my issues was closed ,help on this

i am using the below Mail script

 

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

// Add your code here
var obj = new KBKnowledge().getNotificationObject(current);
var emailContent = {};
emailContent.templateContent =
"Hi " + obj.approver + ",<br/>" +
"<br/>" +
"<a href=" + obj.article_link + ">" + obj.number + "</a> is awaiting approval for retire.<br/>"+
"<br/>" +
"<b>Article Title</b>: " + obj.short_desc + "<br/>" +
"<br/>" +
"Please review the article and <a href=" + obj.approval_link + ">Approve/Reject</a> it<br/>" +
"<br/>";
email.setSubject(obj.number + " is awaiting approval.");
template.print(emailContent.templateContent);
})(current, template, email, email_action, event);

Hi Techno,

I would suggest to remove "Hi " + obj.approver + ",<br/>" +

Kindly use the OOB notification content and write Hi ${assigned_to} and then you can call the mail script. See if that works.

Regards,

Deepankar Mathur