Serviceportal get url The easiest way to redirect in Service Portal is by using an HTML anchor tag (<a>) with the href attribute. get ( ' sysparm_aparameter ' ); if ( sURL_editparam == 'true' ) { gs . The spUtil API provides utility methods to perform common functions in a Service Portal widget client script. getURL ('sc_cat_item')". This method is often used for static redirection. $sp. href to get the URL in client side. getGlideURI(). a. Using $sp. getGlideURI (). Using href for Static Redirection. Example of static redirection: this line should give you the URL in server side. CUSTOM URL You can configure one or multiple custom URLs to your instance and configure your custom URL to Service Portal mapping. Classic UI : var sURL_editparam = gs . 2. 1. Here’s a quick tip that shows you how to retrieve the name or URL of your Service-now instance. action. toString(); Regards Ankur Getting the current URL from the server side in ServiceNow can be extremely useful in a variety of contexts, such as when you’re designing custom workflows, integrating with external systems, or even for simple debugging purposes. Client Side - Though I have never tried it out, but in the example for $sp. Server Side - You can use: Returns the (?id=) portion of the URL based on the sp_menu type. Solved: What is the best way to retrieve the current URL in a Service Portal widget? While all this is true, there’s no reason to do all this to get a url parameter. getCatalogItem (), you will see servicenow using " spUtil. These functions include: Display a notification error message. href or this. var url = gs. getParameter() to extract URL parameters in server-side scripts or widgets. . getParameter in the server script will have direct access to all the url parameters without writing any client code. This can come in handy if you need to construct a URL in a business rule or mail script or if you have some automated post-clone configuration when dealing with multiple Service-now instances in your environment. Redirecting in Service Portal. action . NOTE: Custom URLs are not available for (on-premises) customers or (developer. location. Using $sp. addInfoMessage ( 'parameter You can either use window. getMap (). sddjqvndcfacapdnxlbkiovpdinbxxuzekozszkjae