what is GlideURL and how to use it?

bns1
Tera Contributor

what is GlideURL and how to use it for uploading file ?

9 REPLIES 9

Hi Chuck,



Have you completed the documentation about GlideURL? If yes then please share the link.



Regards


Ramandeep


Hi Chuck,

I used the GlideURL() to parse the sysparm_special_instructions parameter which was passed from a Call to a new Catalog item form's URL;

The full string which is returned from the parameter by the GlideURL() is : NEW_CALL_REF%3A24e1789adbc1e700b82ea5305b96192f+

What would be the best (and failure proof) practice to get a sys_id substring from the whole string, and in general, can we be sure that the pattern (i.e. NEW_CALL_REF%3A...sysid...+) will stay the same, and it is safe to use the pattern for all future releases?

Thanks in advance for your reply

Regards

 

Hello,

 

Did you manage to figure this out as I'm looking for something similar?

 

Kind Regards

Ashley

While the Internet only talks about the client-side version, there is a seemingly undocumented server-side version too. It has these properties: 

getClass,getPageName,wait,set,notifyAll,pageName,notify,path,hashCode,get,equals,getParameters,getPath,toString,class,parameters
 Calling some of them such as
getParameters will result in an exception. I suspect this is meant to be instantiated through GlideSession.
var url = new GlideURL('https://<instance>/sys.scripts.modern.do');
gs.info(url.getPageName());

GlideURI is also available and documented, but seems limited as well.