Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Declarative actions in UI Builder

Pallavi Gaikwad
Tera Expert

Hi All,

 

I want to implement a page navigation in workspace.

 

I have built a custom workspace. In that workspace have added 3 declarative actions i.e., New, create new user and create new business. These are implemented as UXF client action. Have grouped these actions in action group1.  Order for them are as 0, 1, 2 respectively. These actions are appearing in record list header. I want to configure navigation on clicking those actions. 

 

If I click on create new business action, then it should redirect to create record page in workspace. 
I Tried by adding event 'Declarative Action Client Script Button Clicked'. Also tried 'Declarative action redirect requested' event. However both are not working. 

 

Please let me know how can I implement this navigation. 

Thank you in advance for your support!

1 ACCEPTED SOLUTION

I tried that video in my PDI and it is working fine, please check the steps,

 

Create UI Action 

SarthakKashyap_0-1761115511869.png

Add code in workspace script

SarthakKashyap_1-1761115545578.png

Save it

 

Now navigate to All> Now Experience Framework> List Action

Create New and add same code in client script 

SarthakKashyap_2-1761115619160.png

 

Result

SarthakKashyap_3-1761115654473.png

SarthakKashyap_4-1761115668820.png

 

 

 

 

 

 

View solution in original post

11 REPLIES 11

lauri457
Giga Sage

Heres a link with instructions on using DAs, you would be up to section 5. starting from this heading in the link
Introduction to Declarative Actions - ServiceNow Community

 

You'd need to next create your sys_ux_addon_event_mapping to map the payload to an event to be handled.

Look at existing new/create new sys_declarative_action_assignment records corresponding to the action model you are configuring and the event mappings to see how they are configured for SOW. 

Sarthak Kashyap
Kilo Sage

Hi @Pallavi Gaikwad ,

 

Can you please check below video, maybe this will help you .

 

https://www.servicenow.com/community/servicenow-ai-platform-blog/servicenow-agent-workspace-redirect...

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards

Sarthak

I tried that video in my PDI and it is working fine, please check the steps,

 

Create UI Action 

SarthakKashyap_0-1761115511869.png

Add code in workspace script

SarthakKashyap_1-1761115545578.png

Save it

 

Now navigate to All> Now Experience Framework> List Action

Create New and add same code in client script 

SarthakKashyap_2-1761115619160.png

 

Result

SarthakKashyap_3-1761115654473.png

SarthakKashyap_4-1761115668820.png

 

 

 

 

 

 

Hi @Pallavi Gaikwad ,

 

If my answer helped you to resolve your query please mark my answer correct and helpful if this works for you

 

Thanks and Regards,

Sarthak