How to Configure CI Class in the Model category for Handheld devices

Manasa23
Tera Contributor

HI,

I'm trying to Create a CI  class for the OOB Hardware class  Handheld Devices, but CI class is not editable, can Someone please help me on this ???

find_real_file.png

2 REPLIES 2

AnirudhKumar
Mega Sage
Mega Sage

Why don't you use the OOB CI class cmdb_ci_handheld_computing

Michael de Boer
Giga Guru

Hi Manasa,

When I try to change the CI Class with a background script, I get the following error:
"Changing the CI class after creation is not allowed"

This action is blocked by the business rule "Protect cmdb_ci_class".

You can try this, but test it good on a test environment!!

1. Disable the Business Rule "Protect cmdb_ci_class".
2. Run the script below in the "Scripts - Background"
3. Enable the Business Rule "Protect cmdb_ci_class"

Script
Change the name "Handheld Computing" to the name that you are using for the Model Category you want to change.

var gr = new GlideRecord("cmdb_model_category");
gr.addQuery("name", "Handheld Computing");
gr.query();
while (gr.next()) {
gr.cmdb_ci_class = "cmdb_ci_handheld_computing";
gr.update();
}

 

Regards,

Michael

Regards,
Michael

Please mark the suggestion as helpful/like, if you find it useful to you or others who wants to refer similar content.
Please mark the solution as correct, if the answer provided has resolved your query.