Service Desk Practitioners Forum
cancel

get a list of read only fields for a configuration item

SOLVED
Go to solution
Highlighted
kh_3
Trusted Contributor.

get a list of read only fields for a configuration item

what is a good way to get a list of read only fields for a given config item using the api?

can the method isModifyAllowed be used??
5 REPLIES
Mike Bush
Acclaimed Contributor.

Re: get a list of read only fields for a configuration item

Yes - I think "isModifyAllowed" is your best bet - the issued JSP for Service Pages tests each field with this before deciding to show it in an amendable INPUT field or as a read-only presented value. This also allows for role by role variation in who can / cannot amend each field.
kh_3
Trusted Contributor.

Re: get a list of read only fields for a configuration item

but using this method, you need to call this everytime with the field name and the session..
can you give the session and the config item and get a list of read only items at once??

Thanks
Mike Bush
Acclaimed Contributor.
Solution

Re: get a list of read only fields for a configuration item

No, sorry, no ability to make a "general enquiry" like this. I suppose you could loop through all of the fields you intend to use and make a note in an array but this is hardly better than preceding each field display by the query?
kh_3
Trusted Contributor.

Re: get a list of read only fields for a configuration item

yea.. so there isn't a way to get the list as a one off call via the api..OK.. Thanks a lot.. I think I will call the api for each field only when I need to display it..

Thanks again..
kh_3
Trusted Contributor.

Re: get a list of read only fields for a configuration item

Hi,
I'm using Ismodifyallowed to check if the field is allowed to be edited. But it's always returning false(even when it should be true).. Anyone knows why?? I'm using servicepack21.
Thanks.