How do you open an external URL in SOW with a declarative action?

Dean33
Tera Contributor

The subject says it all. I have duplicated the SRP Record in the SOW Experience and want to add a button to the action bar. I have seen how to create a declarative action but I can't figure out how to trigger anything in UI Builder. Please provide a full end to end explanation from the declarative action setup to the configuration in UI Builder. I am currently using Zurich. Thanks in advance.

7 REPLIES 7

Tanushree Maiti
Kilo Patron

Hi @Dean33 ,

 

Check if this helps:

https://www.youtube.com/watch?v=C8KDDHUvNO8&t=1s

https://www.servicenow.com/community/developer-articles/how-to-redirect-user-to-an-external-page-in-....

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

So that seems to only tell part of the story. How would I either call the page script which calls the event from the declarative action?

That video shows a declarative action implemented as a uxf client action. At a quick glance it looks like the fields have changed names or are different nowadays.

 

With a uxf client action you are not calling any scripts, your DA is tied to an action model that provides the fields that the action is aware of. On a list action for example you have access to things like the groupby filter, the selected rows, table, view etc. The DA is used to emit an event that can be mapped to an existing handled event.

 

On the video the ui_dashboard event is mapped to the navigation event. The handler for the navigation event exists oob. 

Shruti
Giga Sage

HI @Dean33 

Open the declarative action

Make it implemented as client script and use open(<URL>) in the client script

 

function onClick() {

 }