Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

URL is not working in Notifications

Rakshanda Kunte
Tera Contributor

Hi All,

 

I have created a notification in dev on 1 table with some condition and in "What it will contain" tab provided the link of Prod Service Portal Form.

Issue is, when I am opening that link from dev it does not load the full form. It loads only when I refresh the page.

 

I tried clearing cache as well. 

 

Anyone knows, what can be the issue?

 

 

Thanks..!!

 

4 REPLIES 4

Community Alums
Not applicable

Hi @Rakshanda Kunte ,

You can check you mail script with the below mail script as a reference :

Try this in mail script: 

    var gr = new GlideRecord('sysapproval_approver');
    gr.addQuery('sysapproval',current.sys_id);
     gr.addQuery('state','requested');
    gr.query();
    if (gr.next()) {
        template.print('<a href='+gs.getProperty('glide.servlet.uri')+'/ess?id=approval&view=ess&table=sysapproval_approver&sys_id='
+ gr.getUniqueValue() + '>' + gr.sysapproval.number + '</a>');
}
   
 

Ankur Bawiskar
Tera Patron
Tera Patron

@Rakshanda Kunte 

in dev instance why are you giving prod url?

why not give relative url?

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

Hi @Ankur Bawiskar ,

 

The notification has other URLs which are Prod ones.

 

@Rakshanda Kunte 

better give relative URLs because you must have migrated the email script from dev->test->prod

prod url will only work in prod

relative url something like this /sp?id=ticket etc

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