534
Views
9
Comments
How to call a screen action using Javascript?
Application Type
Traditional Web

Hi,

I need to call screen action using javascript in traditional application, how can i do that?


thanks,

Bhuvan

UserImage.jpg
vikas sharma
Champion

Hi

If screen action is available to access by js you can simply call it by $actions.your action name.

Regards

2025-02-10 17-24-13
Arun Rajput

Hi @Bhuvan Chandra Vechalapu ,

You can achieve this by following below steps.

1)drag and drop one button in same page and make visible property to No(hide the button)

2) Attach screen action to the button which you want to call by javascript.

3) Now use onclick function for this button to trigger it's logic in javascript code.

Like this you can call screen action.

Thanks,

Arun 

2025-04-17 05-42-16
Ajit Kurane

Hi Bhuvan,

Please refer below thread, You can find sample oml file in below thread.

https://www.outsystems.com/forums/discussion/61169/how-to-call-screen-action-in-javascript-in-outsystem-web/


Thanks.

2023-07-25 17-04-53
Mohit Sharma

Hi @Bhuvan Chandra Vechalapu

You can simply call it using $actions.ActionName(). In below screenshot you can see that under Screen Actions you can find all available screen actions, you just double click on it and it will create code for you. Find .oml file also for your easy reference 


Best of luck


ScreenActionCalledinJS.oml
2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

People, read the question carefully before replying, this is a out traditional web. $actions. is only available for reactive web and mobile.

2023-06-09 10-11-01
Mayuri Pokale

Hi Bhuvan, 

Can you please explain the scenario where you want to implement this? 

Regards

2023-09-06 07-26-35
Sudip Pal

Hi Bhuvan,

 In your case you are using some action to trigger the JS. 

In my case the action while will trigger the JS is "Action_That_Will_Trigger_JS".  It calls the "ScreenAction" throught JS code that is trigger by "Action_That_Will_Trigger_JS". 

Thanks & Regards, 

Sudip Pal

Demo_Js2.oml
2022-12-30 09-46-57
Deepika Patel

Hi @Bhuvan Chandra Vechalapu,

Darg the "RunJavaScript" server action from HTTPRequestHandler and use this ""document.getElementById('"+ ScreenAction.Id +"').click()"" js in the server action.

ScreenAction.Id is the id of the screen action you want to trigger.

Thanks,

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.