
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2018 01:44 PM
We have several Hardware records that were incorrectly created under the base class: Assets. I need to move these to the Hardware Class but that field is not editable, even at an ADMIN level.
Does anyone know a way to change these records?
| ||||||
|
Solved! Go to Solution.
- Labels:
-
Enterprise Asset Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2018 02:00 PM
You can write a background script and update the class value.
var gr = new GlideRecord("alm_asset");
gr.addQuery(Record sys ids or query to all those records which needs to be modified);
gr.query();
while(gr.next()){
gr.sys_class_name = "alm_hardware";
gr.update();
}
If the script works in Dev, move the code to Prod through a Fix Script. and Run it adhoc in Production.
Best Regards,
Rahul
Please mark Correct / Helpful if this resolved your query.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2018 02:00 PM
You can write a background script and update the class value.
var gr = new GlideRecord("alm_asset");
gr.addQuery(Record sys ids or query to all those records which needs to be modified);
gr.query();
while(gr.next()){
gr.sys_class_name = "alm_hardware";
gr.update();
}
If the script works in Dev, move the code to Prod through a Fix Script. and Run it adhoc in Production.
Best Regards,
Rahul
Please mark Correct / Helpful if this resolved your query.