Email Action button

nameisnani
Mega Sage

Hi Team , 

 

I have a requirment on 'Problem' table . 

 

In the notification we need to add two buttons ' Approve ' and ' Reject ' . 

 

If we clicks On approve button , in the problem record worknotes should updated with ' approved ' . Same as if we clicks on reject  in the problem record worknotes should updated with ' rejected ' .

 

nameisnani_0-1750653646697.png

 

I have added image 

nameisnani_1-1750653725899.png

 

This is the mail scritpt 

nameisnani_2-1750653765645.png

 

added this email script to the notificatin 

nameisnani_3-1750654001200.png

 

 

while prevewing the notification , showing undefined 

nameisnani_4-1750654065237.png

 

can anyone please help me on this request with steps , if possible please provide screenshots for better understanding .

9 REPLIES 9

Chaitanya ILCR
Kilo Patron

Hi @nameisnani ,

looks like you are following below thread to include the button

 

https://www.servicenow.com/community/itsm-blog/approve-reject-button-in-approval-notification/ba-p/2...

 

I see an extra space in the notification message HTML 

${mail_script:email.button.approve.insert}

 

and Make sure the 

renderMailtoButton is available in your system

 

I would copy the things exactly as stated in the blog and try again

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

@Ankur Bawiskar @Chaitanya ILCR 

 

I have removed the space  after that also showing undefind .

nameisnani_0-1750659028040.png

 

@nameisnani 

try to use _ instead of dot in the name of email script

Also note if you are referring to this link for showing the images then the script include name and function name are same and might cause issue, so have that separate

Approve/Reject button in Approval notification 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar  

 

My requriement is different , 

 

I have a requirment on 'Problem' table .

In the notification we need to add two buttons ' Approve ' and ' Reject ' .

If we clicks On approve button , in the problem record worknotes should updated with ' approved ' . Same as if we clicks on reject in the problem record worknotes should updated with ' rejected ' .

 

could you please provide me the steps according to my request