ATF: I am trying to create a change request from a incident ticket. I received error

YolandaF
Tera Contributor

Good Morning all,  

I am trying to create a change request from a incident ticket. I received error

TypeError: changeRequestDateMsg.empty is not a function

 

Any guidance will be appreciated.

 

Screenshot 2025-01-20 095434.png

screenshot_2025_01_20_15_30_35_failed.jpg

 

9 REPLIES 9

Ct111
Giga Sage

Can you check if all the  required fields in CHANGE request is filled when you are trying to create from incident.

 

VErify if your UI action has something like below in code

 

var change = new GlideRecord("change_request");
change.initialize();
change.short_description = current.short_description; // incident Short description mapped to change short description.
change.description = current.description;
change.cmdb_ci = current.cmdb_ci;
change.priority = current.priority;
var changesysID = change.insert();
action.setRedirectURL(change);

Ankur Bawiskar
Tera Patron
Tera Patron

@YolandaF 

are you getting same error when you are testing it from UI ?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Screenshot 2025-01-21 080154.png

  •  In the incident form, we have a custom pop-up that I was able to use the custom UI test category to capture the feature.  The change is not fully populated because it was just a test to show that I was able to create a change from an incident record

Viraj Hudlikar
Giga Sage

Hello @YolandaF 

 

Did you tried to check the existing OOB Test available, try to follow same and see if it can help you out.
In your personal instance you can check for below url


https://yourpdinumber.service-now.com/sys_atf_test.do?sys_id=995f7191731423002728660c4cf6a7ff&syspar...

If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.