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.

glide.servlet.uri

Chandra31
Tera Contributor

Hi Team,

In my project we are using custom uri's, i just want to compare both the uri's(Prod and DEV) and it should display Production uri. Can anyone suggest me.

Thaks

CSR

 

9 REPLIES 9

Srinath16
Tera Contributor

Hi Willem,

I am getting this error while creating the below property. Can You please suggest what to do on this.

glide.servlet.uri

find_real_file.png

Not sure what you are trying to do? You should not change this property. The 'error' is a warning that you should not update this property. It will not allow you to do so.

 

This is a property managed by SeviceNow, always containing your specific environment information. So no need to manually update.

 

Hope this helps! 🙂

Srinath16
Tera Contributor

Im using that property in the below script. url: gs.getProperty('glide.servlet.uri')

If the property not there in system properties how it identify our instance.

(function execute() {

var siteid = newGlideRecord('u_asset_siteid');

siteid.get(vaInputs.siteid_of_my_account);

var title = {

url: gs.getProperty('glide.servlet.uri') + '/' +

gs.getProperty('sn_itsm_va.com.snc.itsm.virtualagent.portal_url') +

'?sys_id=' + siteid.sys_id + '&id=ticket&table=u_asset_siteid',

label: siteid.display_name

};

var fieldList = ['display_name', 'account', 'u_password_vault_enabled', 'u_secure_access_storage'];

var cardRenderer = new global.VaRecordCardRenderer(true);

var fields = cardRenderer.createFields(fieldList, siteid);

var html = cardRenderer.renderCard(title, fields);

return html;

Hi there,

glide.servlet.uri is an out-of-the-box property. Only you might not see it when searching the system properties table.

Just try for example in background script:
gs.info(gs.getProperty('glide.servlet.uri'));

Notice you will get you instance url. Something like:

*** Script: https://xxxxx.service-now.com/

Your question is on Virtual Agent, creating a custom Card? You actually don't need to add the glide.servlet.uri. You can leave out:

gs.getProperty('glide.servlet.uri') + '/' +

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Srinath16
Tera Contributor

yes. it returns a link to the instance that i logged into. Thanks for the guidance.