On change form adding incident field

Vaibhav Ramteke
Mega Contributor

IN SERVICENOW when I am raising a normal or emergency change request I want to have Incident field to be mandatory because of which this change has come. How can I make this possible with out of the box settings. where I can save this related incident number in Change table.

 

Suggest the solutions

2 ACCEPTED SOLUTIONS

Nilesh Pol
Kilo Sage

@Vaibhav Ramteke If users create the change directly from an incident, OOTB functionality automatically populates the change request ( rfc) field on the incident form and the same incident record is get added to related list "Incidents fixed by changes" of change form.

 

You can make change request field (rfc) field of incident form and achieve this requirement with help of dictionary override functionality of this field.

View solution in original post

Hi @Vaibhav Ramteke 

The solution I gave , it will work to enforce populate incident from Change-> Incident Fix by change related list

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

View solution in original post

4 REPLIES 4

Tanushree Maiti
Kilo Patron

Hi @Vaibhav Ramteke 

 

To achieve your requirement , create a Before Update Business Rule: 
  • Table: Change Request 
  • When: before,update
  • Condition: Type is Normal OR type is Emergency AND State is Assess
  • (function executeRule(current, previous /*null when async*/ ) {
        var gr = new GlideRecord("incident");
        gr.addQuery("rfc", current.sys_id); // rfc is the field on incident pointing to change    gr.query();
        if (!gr.hasNext()) {
            gs.addErrorMessage('Please add at least one Incident in the "Incidents fixed by Change" related list.');
            current.setAbortAction(true);
        }
    })(current, previous);

 

Refer: https://www.servicenow.com/community/itsm-forum/you-must-link-an-incident-to-an-emergency-change-in-...

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Nilesh Pol
Kilo Sage

@Vaibhav Ramteke If users create the change directly from an incident, OOTB functionality automatically populates the change request ( rfc) field on the incident form and the same incident record is get added to related list "Incidents fixed by changes" of change form.

 

You can make change request field (rfc) field of incident form and achieve this requirement with help of dictionary override functionality of this field.

Vaibhav Ramteke
Mega Contributor

but i don't want to create change directly from an incident, when i create change that time its populate like that

Hi @Vaibhav Ramteke 

The solution I gave , it will work to enforce populate incident from Change-> Incident Fix by change related list

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: