MakeAndModelJS script include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2022 10:32 PM
Hi All,
I am trying to understand what script include named as MakeAndModelJS do ? In comments, it says, it will pick the record from model table if model name is not not null (line no. 16).
I am looking for any documentation which elaborate the whole thing like how variable 'modelTable' is getting set here? What is model table? etc
Thanks in Advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2022 12:59 AM
modelTable calls an internal java class to which we don't have access to. It effectively just returns the table name and validates that the table inputted as part of the fromNames() function is a valid one. Any table that extends cmdb_model is usable. You can even use short terms for the name (i.e "hardware" rather than "cmdb_hardware_product_model").
You then have a series of functions to return information. It's a better way than doing a glide query on the table and potentially creating duplicate models.
If you've used the new Integration Hub ETL application for robust CMDB import, that leverages this script include for reconciling model information.
getManufacturerGlideRecord ()
getManufacturerName ()
getManufacturerSysID ()
getModelGlideRecord ()
getModelName ()
getModelNameSysID ()