isvalidfield definition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2017 05:27 AM
Hi All,
As per documentation isValidField() method used to check whether the column present in table or not. But, this method is returning false when end user logged in but working fine for ITIL and admins.
What can be the reason for this?
Regards
Swamy
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2017 05:31 AM
Hi Swamy,
It must be returning false because of read acl on that column for that end user.
login with your end user and do table.list in left nav it should open list of records and then in the gear icon try to search that field.
If that field is not shown then it means user cannot access this column and hence isValidField() returning as false.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2017 06:01 AM
Hi Ankur,
Thanks for reply.
There is no explict "Read" ACL created for "Created" field. Do i need to create a new read ACL, will it impact OOTB ACLs?
Regards
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2017 04:37 AM
Hi Ankur,
Thanks for the reply !!
I checked all acls and Endusers have read access to this field. Not sure why it is returning false.
Regards
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2017 06:20 AM
Hi,
It sounds it could either be due to an ACL or due to a onBefore Query Business rule that could be restricting the user from having visibility to the existence of the field. Keep in mind that the read ACL could exist at any level within the hierarchy of the table you have. It's ok to create a new ACL when needed. The impact will be the new behavior you're introducing based on the change that you perform. Make sure you properly test your change against intended and unintended behaviors.
Thanks,
Berny