- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2020 09:03 AM
Hello
I have changed my formular for computers in CMDB in order to get the most important fields first.
I have created one data policy on table cmdb_ci_computer to have some fields mandatory and to have the field “Class” read-only (as it is auto filled when creating a computer).
When I create a new computer, I fill all mandatory fields (class is filled by default) I get an error message
"Data Policy Exception: The following fields are read only: Class"
Having the field Class read only was exactly what I expected from the system (as per defined in my data policy) but why does the system does not let me create the new computer?
What kind of object does not let me store this computer?
Regards
Vanessa
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 12:46 AM
Hi Vanessa!
The idea behind read-only data policies is exactly that: restricting write access based on the conditions you set. So, if there you set no conditions whatsoever, then you won't be able to write to sys_class_name, unless you explicitly force it with a script.
Whenever you create a new record, what is does is system writes to that field as well, hence the error. Class is a system column that's normally not placed on the form, why do you need it there?
What you can do is create an equivalent ACL and give role-based access. Or, if all you need is client-side restriction, you can just go ahead and use a UI policy.
Please mark this response as correct/helpful if this is what you've been looking for!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 12:46 AM
Hi Vanessa!
The idea behind read-only data policies is exactly that: restricting write access based on the conditions you set. So, if there you set no conditions whatsoever, then you won't be able to write to sys_class_name, unless you explicitly force it with a script.
Whenever you create a new record, what is does is system writes to that field as well, hence the error. Class is a system column that's normally not placed on the form, why do you need it there?
What you can do is create an equivalent ACL and give role-based access. Or, if all you need is client-side restriction, you can just go ahead and use a UI policy.
Please mark this response as correct/helpful if this is what you've been looking for!