How to asynchronously call server-side function from the client in a UI page

Mohammad1
Tera Contributor

Hi all,

I have a UI Page with a function in the server side (in the Processing Code section). I need to write code in the client script section to asynchronously call the server side function. How can I do that? Thank you in advance for your help.

1 ACCEPTED SOLUTION

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate answer as correct & helpful to close the thread.

If not, please let us know if you need some more assistance.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Sajilal
Mega Sage

The same way you would call a from a Client Script, can you give a try.

https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/script/server_scripting/reference/r_ExamplesOfAsynchronousGlideAjax.html

Thanks,

Saji

Ankur Bawiskar
Tera Patron

Hi Mohammad,

you cannot call the function present in processing script directly from the UI page client script.

if you are using <g:ui_form> and submitting then the processing script would execute by default

please explain in detail what needs to happen

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks for your answer. It seems that it is not possible to do so. I solve my issue by calling a script include.