The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Project - Notification -Create a Button which on click redirects to that sepcific approval.

Trupti Krishnam
Tera Contributor

I have a notification which runs when the project state is Screening and Approval is requested (Here the approval will also be assigned to - to whom ever the project is assigned) .and it is sent to Assigned to Now on this notification I have to create a Button called 'View Approval Task'  which on click it should redirect to that 

Specific Approval task  Something like the below image 

 

 

TruptiKrishnam_0-1758116986425.png

 

TruptiKrishnam_1-1758117327480.png

I did tried by creating a below mail script but it's not working

var message = 'View Approval Task';
    var backgroundColor = 'background-color: #152456;';
    var color = 'color: #ffffff; font-weight: bold;';
    var fontSize = 'font-size: 12px;';
    var fontBold = 'font-weight: bold;';
    var fontFamily = 'font-family: trebuchet ms, geneva;';
    var textDecoration = 'text-decoration: none; border-radius: 2px; text-align:center;';
    var display = 'display: inline-block;';
    var padding = 'padding: 10px 20px;';

    var app = new GlideRecord('sysapproval_approver');
    app.addQuery('sysapproval', current.sys_id);
    app.addQuery('state', 'requested');
    app.orderByDesc('sys_created_on');
    app.query();
        if (app.next()) {
            template.print('<a href="' + link + '"');
            template.print('style="' + backgroundColor + color + fontSize + fontBold + fontFamily + textDecoration + display + padding);
            template.print('">');
            template.print(message);
            template.print('</a>');
        }
 
but it's not working 

 

0 REPLIES 0