Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Update 'Discovery Schedule Name' when the CI is update by Discovery.

Sohail Khilji
Kilo Patron

We have multiple discovery schedule running on scheduled basis, I want to update the Name of the discovery schedule in ''CI description'' field when ever discovery updates the CI during discovery.

 

Example :

Discovery Schedule Name : Berlin_datacenter_Vcenters.

CI Description Field Value to be updated as : Updated by 'DISCOVERY > Berlin_datacenter_Vcenters'.

 

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

1 ACCEPTED SOLUTION

This one peaked my curiosity. Neat idea.

(function() {
    var comment = "Updated by schedule:" + current.status.dscheduler.name + '';
    var updated_ci = new GlideRecord("cmdb_ci");
    if (updated_ci.get(current.cmdb_ci.sys_id)) {
        updated_ci.setValue('comments', comment);
        updated_ci.update();
    }
}());

 

View solution in original post

6 REPLIES 6

Sohail Khilji
Kilo Patron

i got to create a funtion and see if it helps me.. thanks for your time @shloke04 ... keep going 🙂


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect