- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 02:29 AM
Hi
I need to create a UI action (Validate User) on the user table.
as soon as it is clicked, it should trigger a script include to fetch the OTP and then send that otp to the phone number using notify and Twillio (configuration is sorted)
after that, a prompt or pop should open asking for the otp
how can I first call a business rule and then on-click client script on UI action because normally the order is first on click client script and then business rule, Please help 🙂
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 02:32 AM
There are 2 ways i can think of
1)
You can have a client side ui action.
In the client script use Glide Ajax to pass the control to server side and run the server script.
Then return to the client side and run the Client Code in the callback function.
2)
Have a custom field or flag on the form
On the ui action only run the BR, Then in the BR change the value of the custom field
in the client script, check for the flag and only run the code when the flag is changed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 02:32 AM
There are 2 ways i can think of
1)
You can have a client side ui action.
In the client script use Glide Ajax to pass the control to server side and run the server script.
Then return to the client side and run the Client Code in the callback function.
2)
Have a custom field or flag on the form
On the ui action only run the BR, Then in the BR change the value of the custom field
in the client script, check for the flag and only run the code when the flag is changed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 03:56 AM
Hello Anurag,
A BIG, BIG thanks to you, I used the first way to create a script include and then run server code in it. Thanks a ton once again!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 03:56 AM
Happy to help.