Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The curve salvation method of Ajax API asynchronous call cannot be used in the CSM of ServiceNow.

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

It is another 1024 holiday a year, or we should release some practical information to prove that we are still alive!

In CSM (* * Customer Service Management**), we found that standard users of CSM do not have a SNC_INTERAL role, so that XML does not load ITEM items when AJAX code is executed, resulting in AJAX exceptions being reported on the ServicePortal page all the time (this has fooled us for a long time!) . Maybe that's what SN was designed to do, and it doesn't allow users without internal roles to use asynchronous calls. But the reality is that a lot of data needs to fill in some information when the field onchange, that is, the user is very lazy.

Since users want to be lazy and SN won't let us use GlideAjax, we still find a curve way to save the nation after repeated tests. The specific operations are as follows:

Using Inbound Message: create a REST API, which simulates the way GlideAjax calls to get server data.

Get back to the original: use JQuery to call REST API to perform asynchronous updates.

Copy the original library code of JQuery in UI Script and add $$j = JQuery.noconfit (), and $$J can decide for yourself. Note: never check the global option. Regret medicine is not easy to find, of course I have.

The corresponding dependency is injected into the service portal side, and the JS Include script corresponding to the dependency is the corresponding UI Script library. On the Fufler side, you can directly use the $$j defined above.

Final update: this article is used only as a pre-development discussion, is a workaround, it will be abnormal in new versions such as Madrid. In fact, the ultimate problem is that the external user does not have the authority, when loading the CSM module, the system does not open any rights to the external user, in order to distinguish. So the ultimate solution is to add permissions to the corresponding ajax method in acl.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 236

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report