isvalidfield definition

Venkat122
Kilo Guru

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

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

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


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

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


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


bernyalvarado
Mega Sage

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