User not visible while populate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2023 01:15 AM - edited ‎07-11-2023 01:17 AM
Hi All,
I have s catalog form referenced to Business application and another variable which populates based onChange of Business application it fills with the respective Business Owner and after populating it makes read only. But for some users it populates as blank and makes them read only but if I login as admin and use the same the name is displayed for me.
Its not for all records some of them are populated and visible fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2023 03:01 AM
It seems for non-admin users they don't have access to the table being referred by Business Owner or something is restricting the data
how are you auto populating it? please share that script or logic along with screenshots.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2025 08:57 AM
Hi @Ankur Bawiskar ,
I am facing the same issue :
The business application owner is a custom field and popus up on the form when related business application is chosen. This works fine for Admins, but doesn't work for Non-admins
User has access to the business application table and can view the record as well.
On change Client script on the Business Application:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue === '') {
return;
}
var app = g_form.getValue('name_of_application');
var ga = new GlideAjax('businessOwner');
ga.addParam('sysparm_name', 'getOwner');
ga.addParam('sysparm_app_name', app);
ga.getXML(HandleResponse);
function HandleResponse(response){
var answer = response.responseXML.documentElement.getAttribute('answer');
if(answer) {
alert(answer);
g_form.setValue('application_business_owner', answer);
} else {
g_form.clearValue('application_business_owner');
}
}
//Type appropriate comment here, and begin script below
}
Script include:
var businessOwner = Class.create();
businessOwner.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getOwner: function() {
var appOwner = this.getParameter('sysparm_app_name');
//var result = '';
var owner = new GlideRecord('cmdb_ci_business_app');
if (owner.get(appOwner)) {
return owner.u_bus_owner;
}
},
type: 'businessOwner'
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2025 09:23 AM
I just found there is an ACL in script Include which was restricting the execution to only Admins. I have changes it to non-admins, issue is fixed.