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

Dean33
Tera Contributor

So I was able to make it work...almost. I created the Declarative Action Assignment as UXF Client Action. In that I created a Action Payload Definition. I then created the UX Add-on Event Mapping but for the time being I hard coded the value of the Target Payload Mapping (my url getting passed to the event in UI Builder). After that I added the declarative action to the UX Form Action Layout as a Button. In UI Builder I added an event in the Handled events of the Body of the page. In the event I set the URL as a payload field. Lastly, I added a event mapping to the Body point to the newly created event. Then I added the Open page or Url handler binding the External URL to the event payload.

My next step is to figure out how to dynamically load the event payload instead of hard coding the value in the Target Payload Mapping. Not 100% if this is right or wrong but it worked.

Declarative actions are pretty limited to what the page and component authors had in mind so you are limited to the action model fields which you can bind to your payload with the double bracket notation {{variable}}. Since you seem to be the page author as well you can create a client script handler which will then use api.emit to emit the navigation event with a scripted payload.

 

What exactly are you trying to do?

@Dean33 ,

You can dynamically bind only the payload fields which will show under related list payload fields of the Declarative action.You can use them in the action payload of the UXF Client action as {{sysId}} and map that action payload in the target event mapping of the UX-add on Event Mappings then you can get that value in the UI Builder Handler Event Setup .

If my response helped,mark it as helpful and accept the solution.