ServiceNow CMDB CI Relationships created thorugh scripts not displaying in Form dependency view

rahulyamgar
Tera Guru

Hello friends,

 

Below script is not showing the relationship created from the script. Below is the script:

var relGr=new GlideRecord('cmdb_rel_ci');
relGr.newRecord();
relGr.setValue('type','25242fb2377a9200738d021a54990e88');//"Owns::Owned by" relationship type
relGr.setValue('parent','b4fd7c8437201000deeabfc8bcbe5dc1');
relGr.setValue('child','fad823f67f0000010186d3153258344c');
relGr.insert(); //Create the relationship record

 

Thanks,
Rahul

1 ACCEPTED SOLUTION

Hello, 

 

Relationships are getting created but they were made invisible by adding them to the relationship exclusion table.

 

By altering this table entry, it worked.

 

Thanks,
R

View solution in original post

2 REPLIES 2

AJ-TechTrek
Giga Sage
Giga Sage

Hi @rahulyamgar 

 

Looks like script is correct, Please try with manual creation of Relationship of that record and see whats the response.

 

Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.

 

Thanks

AJ

Linkedin Profile:- https://www.linkedin.com/in/ajay-kumar-66a91385/

Hello, 

 

Relationships are getting created but they were made invisible by adding them to the relationship exclusion table.

 

By altering this table entry, it worked.

 

Thanks,
R