- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2022 05:21 AM
Hi Developers!,
I have a list type field which is 'Contact Category' which is referenced to a table ' contact categories' When data is loaded from salesforce to Servicenow using transform map it will directly map to this field. However SNOW should have access to 2 choices in this field which are 'Admin ' and 'Tech. So i was trying to check what can we do to have the field only these two choices are editable and the others coming from Salesforce are read only.
For example This 'Partner Manager' is transformed from Salesforce. I want it to be read only.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2022 09:49 AM
Hi,
I've asked in my original reply what do you mean by read only?
You're not making it clear what you mean by that. I've given my assumption as to what you mean and you didn't say one way or the other.
The list field has selections available. You've limited those selections. That is done by reference qualifier. When you say read only...what do you mean because you have 2 things going on....you have the list field with selections in it...and then you have the referenced table...showing those selections.
I described in my original reply above what you'd need to do if you're talking about making the "selections" read only. Meaning those specific records and not allowing people to edit them.
Again...that is separate from the list field.
At this point, I think we're all confused as to what you're trying to do and we'd need more information. Otherwise, we have people just replying with things we think you're meaning. One of us could be right or none of us are right, haha, who knows...
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2022 05:26 AM
Hi Bobby,
You can use below Onload client script-
(1=New, Rest you can use as per your state value if required )
var s = g_form.getValue('state');
if(s != '1')
{
g_form.removeOption('state', '1');
}
else if (s == '1')
{
g_form.removeOption('state', '3');
g_form.removeOption('state', '4'); }
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2022 05:32 AM
Hello,
Please check below thread which has solution for your requirement
Removing or Disabling Choice on reference field
Kindly mark my response as helpful/Correct as applicable.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2022 05:33 AM
Hi,
I believe you're more so asking about the records on the referenced table than anything to do with the list view. You mean when the user clicks the magnifying glass to select values, if they click on the first column value (such as "Admin" or "Tech") they can actually get to the actual record and from there, make adjustments. Your question is to limit that to only have the non-salesforce record editable?
If that is your question, then you'd need a flag on this table to indicate whether that record was imported from Salesforce or not. Such as a simple true/false field with the integration checking the box (true) when it's imported in. Then, you'd want to review your "write" ACLs for this specific table and ensure that you filter out records that have the import as true, meaning, basic users can't write to these records, thus they're read-only.
Otherwise, your post is a bit confusing as I'm not understanding what you may be talking about other than you want to limit what records appear for selection when the user clicks the magnifying glass and if that's the case, then you'd use a reference qualifier on the list field itself to filter records out that aren't 'x' or 'y', etc.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2022 05:37 AM
Thank you for your reply Allen Andreas! What if we get 'tech' or 'admin' is imported and want to remove it from SNOW end? I want to have the access add or remove those two choices at any given time independent of whether they are imported from Salesforce or not. And all the other choices are read only in this field.