31
Views
2
Comments
Solved
How do I call client actions from javascript in my script folder?
Application Type
Reactive
Service Studio Version
11.54.75 (Build 63578)
Platform Version
11.30.0 (Build 43791)

Hello.

I want to addListener to the marker and call the OnMarkerClick action as a callback function.

I tried using the `$actions.OnMarkerClick` code in the script, but it didn't work.

Help me.

2025-12-04 09-01-03
Kiet Phan
Champion
Solution

file in Scripts is in a seperated context, you can't call the $actions in that file.

otherway, if you wanna add event listener, let do it in the initialize action of your Block.

UserImage.jpg
Trac Duc Anh Luong

I know this is an old post, but here is a workaround to call Client Actions in JavaScript from your Scripts folder:

1. Assign the Client Actions as input parameters:

2. In the Scripts folder, wrap those parameters in a function wrapper using apply().

This took inspiration from the SSE Reactive Client & Debounce Reactive Forge Components. Check them out to see how they call Client Actions in JavaScript from the Scripts folder.

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