Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Jim Coyne
Kilo Patron
Included in the Developer Toolbox Update Set available on Share (link to Share in the post).

 

Related to the "Try It" Tool.

 

Here's "Try It (Portal)", a new tool in my useful tools series.   It's a "Form button" UI Action that will open up a new tab/window and load the current catalog item within a Service Portal:

 

JimCoyne_0-1691887523779.png

 

It's very similar to the OOB "Try It" UI Action that redirects the current window to the catalog item, but this one will open the Service Portal in a new tab/window for you.   There's nothing really special about it, but it saves you from loading the portal and trying to find it in order to test it out.

 

If your Service Portal has a different URL suffix, just change the "var portal = 'sp'" line to whatever is appropriate for your instance.  You can add a System Property record to contain the Portal name, but it's probably just easier to hard-code it right into the UI Action.  I like to use Message and System Property records instead of hard-coding things, but you should weigh the costs versus benefits before creating too many user-definable settings.

 

I've attached an XML export of my UI Action record if you want to just import that.   Try it out in a personal dev instance first.

 

Check out the complimentary "Try It (Select a Portal)" Tool, which allows the user to select the portal they want to see the item in.

 

Update November 15, 2022:

- Fixed an issue with it using a wrong URL.

 

Update March 20, 2022:

- New condition and script

- Now supports Order Guides

- No longer uses "window.open"

- the only condition now is the record has to be active and the user must have the "catalog_admin" Role

10 Comments