We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to call the UI action from another UI Action

SNOW User8
Giga Guru

Hi All,

I have created 2 buttons "Button 1" & "Button 2"

I want to get the Alert message of button 2 when I click button 1 

find_real_file.png

 

find_real_file.png

How to do that?

 

Please guide me..

3 REPLIES 3

Dhruv Chandan
Giga Guru

Hi,

 

Why not write all script in 1 UI Action, else you can use DOM to click other UI Action.

 

Thanks.

Dhruv

Hi All,

 

I am having 2 buttons,

 

For some cases, I want Button 2 (contains few questions) needs to be filled before doing actions in Button 1

And for some cases Button 1 Action is enough.

After reading this you may thing, Hiding the buttons based on the condition is enough

But I don't want to hide buttons 

Ankur Bawiskar
Tera Patron

Hi,

What kind of requirement this would be calling UI action 2 from UI action 1 code?

Is this a valid solution to any of your requirement?

Regards

Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader