The catalog client script is not reflected on mobile.

Minamizono
Tera Contributor

We are developing a mobile app and have configured it to create cases from the mobile app.
We have linked the mobile app to catalog items and have confirmed that cases can be created from the mobile app using catalog items.
However, the catalog client script linked to the catalog item is not functioning within the mobile app. The UI type for the catalog client script is set to “All”.

 

How can we get the catalog client script to function?

4 REPLIES 4

Nilesh Pol
Kilo Sage

@Minamizono

You must ensure your script uses only mobile-compatible APIs and functions. The mobile environment has specific limitations compared to the desktop or standard platform UI, and simply setting the UI type to "All" is not always sufficient if the script contains incompatible code.  

You can review the script for any functions or APIs not supported in the mobile environment. 

please verify with and use Catalog UI Policies instead of client scripts, as UI policies are generally more compatible and performant across different UI types, including mobile.

 

@Nilesh Pol 

 

Thank you for your comment.

 

I looked for mobile-compatible APIs and functions, but found very few.
Where can I find mobile-compatible APIs and functions?
Also, I couldn't reproduce it using the Catalog UI policy. Is it difficult to achieve automatic field updates, read-only fields, and dynamically fetching values from ServiceNow tables when fields change on mobile?

@Minamizono verify below link for Mobile app SDK: Mobile SDK API reference - Android

also: Mobile client GlideForm (g form) scripting and migration • Yokohama API Reference • Docs | ServiceNo...

You can also test by "Using Mobile UI Policies" to reproduce it.

 

 

pavani_paluri
Tera Guru

Hi @Minamizono ,

 

This is a common stumbling block when extending ServiceNow catalog functionality into the Mobile App. The key point is that catalog client scripts do not run in the mobile experience, even if the UI type is set to “All.”

 

You must re‑implement the logic using Mobile UI Rules or Mobile Client Scripts for the mobile app.
Please refer Platform Academy - Mobile client scripting with in... - ServiceNow Community

(31) Client Scripts in ServiceNow Mobile Applications: What You Need to Know? | LinkedIn

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P