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.

gs.action.getGlideURI().toString() not working.

Kevin Smith2
Giga Expert

Hi Experts,

var url = gs.action.getGlideURI().toString();
gs.addInfoMessage(typeof url);

The above code is not converting the 'url' to string.

In gs.addInfoMessage the type shows as object.

anyway I can convert this to string ?

Thanks

Kevin

1 ACCEPTED SOLUTION

Omkar Mone
Mega Sage

Hi 

Can you try this?

var url = gs.action.getGlideURI();
var stringType = String(url);

gs.addInfoMessage(typeof stringType);

 

Hope this helps.

 

Regards

Omkar Mone

2020 Community MVP.

 

View solution in original post

3 REPLIES 3

Omkar Mone
Mega Sage

Hi 

Can you try this?

var url = gs.action.getGlideURI();
var stringType = String(url);

gs.addInfoMessage(typeof stringType);

 

Hope this helps.

 

Regards

Omkar Mone

2020 Community MVP.

 

Thanks Mate.

This is not supporting in Scoped application.
How can we handle this situation.

Regards,
Sangeetha