Want my server script to run once action is made from client side in Service Portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2022 11:36 PM - edited 11-06-2022 11:37 PM
Hi All,
I am working on a widget for the service portal. I have server-side code with a REST message that I want to execute with ng-click. But my requirement is that server-side scripts should only run when some action is performed on the client side. When a user clicks the button on the browser, only then should the server script run. I am able to execute it from server to HTML, but I am finding it difficult to find a connection between the client server and HTML.
Please guide.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2022 11:56 PM - edited 11-06-2022 11:57 PM
Hi @Nikhil G_ ,
You can user server.update() method from client script to invoke server script. You can reference the below link to go through a quick demo of how to use it :
https://www.youtube.com/watch?v=sr_gqqxllRM
I hope this help.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh