Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 05:42 AM - edited 02-20-2025 05:55 AM
This worked for me. In the glideRecord, i have two choices in the dictionary for protocol type. So, I used the corresponding values in the dictionary and it worked.
var populate_modify_network_class = Class.create();
populate_modify_network_class.prototype = Object.extendsObject(AbstractAjaxProcessor, {
populate_modify_network_function: function() {
var obj = this.getParameter('sysparm_share');
var arrayss = {};
var grec = new GlideRecord('u_cmdb_ci_file_share');
grec.addQuery('sys_id', obj);
grec.query();
if (grec.next()) {
arrayss.primary = grec.managed_by.toString();
arrayss.shareType = grec.u_type.getDisplayValue();
//if condition for protocol
if (grec.u_protocol.toString() == 'windows_only')
arrayss.protocol_type = 'windows';
else
arrayss.protocol_type = 'multiprotocol';
}
return JSON.stringify(arrayss);
},
type: 'populate_modify_network_class'
});
Regards
Suman P.