Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 02:27 AM
I am trying to fetch the instance name using a property - gs.getProperty('glide.servlet.uri');
This I am storing as a script variable -instance.
In bot response using html - I am trying to do
<a href = " + vaVars.instance + "/incident_list.do?sysparm_query=stateIN1%2C2%2C3%5Emajor_incident_state%3Daccepted&sysparm_view="> TEST </a>
This does not display anthing.
Could you tell em what is wrong here?
Solved! Go to Solution.
Labels:
- Labels:
-
Virtual Agent
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 03:38 AM
I was able to solve it using script output step -
var singleOutMsg = new sn_cs.SinglePartOutMsg();
var instance = gs.getProperty('glide.servlet.uri')+'';
var link = instance + 'incident_list.do?sysparm_query=stateIN1%2C2%2C3%5Emajor_incident_state%3Daccepted&sysparm_view=';
var url = '<a target='_blank' href=' + link + '>Open Major Incidents</a>'
singleOutMsg.setHtmlPart(url);
return singleOutMsg;
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 02:35 AM
Try managing the quotes properly
var link = vaVars.instance + '/incident_list.do?sysparm_query=stateIN1%2C2%2C3%5Emajor_incident_state%3Daccepted&sysparm_view='
<a href = link > TEST </a>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 03:38 AM
I was able to solve it using script output step -
var singleOutMsg = new sn_cs.SinglePartOutMsg();
var instance = gs.getProperty('glide.servlet.uri')+'';
var link = instance + 'incident_list.do?sysparm_query=stateIN1%2C2%2C3%5Emajor_incident_state%3Daccepted&sysparm_view=';
var url = '<a target='_blank' href=' + link + '>Open Major Incidents</a>'
singleOutMsg.setHtmlPart(url);
return singleOutMsg;