Calling a function of UI Action into UI page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-11-2024 12:56 AM - edited ā12-11-2024 01:12 AM
Hello everyone, I'm currently working on Change module. For a specific requirement I need to call a method of 'Request Approval' UI Action [onAssess] into a UI Page to do come Calculation. The method I need to call from the UI Action is
Firstly is it possible to call an UI Action method into the client script of UI page? If possible can someone help me out here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-11-2024 01:04 AM
yes it's possible.
check this link has an example, enhance it as per your requirement
Call a specific function of UI Action from UI Page
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-11-2024 01:10 AM
@Ankur Bawiskar I have already come across that solution but that solution included adding an option to the form, but I need to call a popUp which is in the done by a function in UI Action.
Here is the Client script I'm using in the UI Page for your reference:
In the above code invokeRiskAssessment(); is the function I'm trying to call from the UI action 'state_model_request_assess_approval'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-11-2024 01:13 AM
you want to call a function present in UI page client script from UI action script?
OR
it's other way?
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-11-2024 01:21 AM
@Ankur Bawiskar Other way, here invokeRiskAssessment() is a method present in UI Action. I want to call this method in UI Page Client script.