sys_ui_element and sys_ui_section

david_legrand
Kilo Sage

Hi,

I'm implementing a CMDB with so many classes and I would like automatize some points:
* personalization of the forms (with sys_ui_element)
* personalization of the lists (with sys_ui_list_element)

So I created a little test with a class and some element with the following data:
* sys_ui_section : sys_id of the sys_ui_section because the ui_section doesn't have an explicit name
* Element : name of an existing element
* position : position of that element in the form

I have done a script like "sys_ui_section.sys_id" (of the sys_ui_element table) = "sys id of the excel file" to attach the ui_elements to the ui_section.

it's:
var sysID = source.u_sys_ui_section;
var section = new GlideRecord("sys_ui_section");
section.addQuery("sys_id", '=', sysID);
section.query();
if (section.next()) {
target.sys_ui_section.sys_id = section.sys_id;
log.info("sysID:" + sysID + "" + ":section sysID:" + section.sys_id + ":name of the section:" + section.name + ":target sys ui section sys id:" + target.sys_ui_section.sys_id);
}

I can see my sys_id on the target.sys_ui_section.sys_id so my transform map is correct but in the sys_ui_element_list.do, i don't have the link between the section and the elements.
Do anyone has an idea on this?

Thanks,
David

1 REPLY 1

davidagostinho
Giga Contributor

Hello David,

 

Do you have any updates related to this subject ?

I m currently working on something quite similar.

Best regards
David