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.

Automated Test Framework (ATF) - Receiving "Cannot read properties of undefined (reading 'message')"

cmitchell2323
Tera Contributor

Hello Everyone!

 

I am currently working on an implementation of ATF using the Incident Management application. I am attempting to create an ATF test from scratch, which involves creating a new Incident record and setting field values. There are certain reference fields that I am setting on the Incident record, which reference the [task], [kb_knowledge], and [problem] tables. When running through this test, I am getting the following error: Cannot read properties of undefined (reading 'message').

 

In order to fix this issue, I did some digging and found this ServiceNow Community post, which provides a workaround. I utilized the workaround from this post , but it did not get rid of the error. Does anyone have any suggestions on how to implement this and remove this error?

1 ACCEPTED SOLUTION

hi @cmitchell2323 

 

Okay..after record query you need to open that record by using Open existing record and then set the feilds.

 

you are using incorrect steps.

Just like this one.

Shaqeel_0-1732620563572.png

 

 

Regards

Shaqeel


***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

***********************************************************************************************************************





Regards

Shaqeel

View solution in original post

5 REPLIES 5

Shaqeel
Mega Sage

Hi @cmitchell2323 

 

If possible could you please attach the steps you are using and the failed result screenshots.

 

Regards

Shqeel


***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

***********************************************************************************************************************





Regards

Shaqeel

Hi Shaqeel,

 

Here is a screenshot of the steps that I am doing to query and set the field values: 

 

Image20241125101055.png

 

Here are the error screenshots that were captured by ATF:

screenshot_2024_11_22_19_22_56.jpgscreenshot_2024_11_22_19_22_49.jpgscreenshot_2024_11_22_19_22_45.jpg

 

Please let me know if there is any additional information that I can provide. Thanks!

hi @cmitchell2323 

 

Okay..after record query you need to open that record by using Open existing record and then set the feilds.

 

you are using incorrect steps.

Just like this one.

Shaqeel_0-1732620563572.png

 

 

Regards

Shaqeel


***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

***********************************************************************************************************************





Regards

Shaqeel

Hi Shaqeel,

 

Thank you so much! This ended up fixing my issue! I really appreciate your help.