Record Insert test step works fine but not set field values in ATF

ServiceNow Use6
Tera Guru

Hi @shloke04 ,

I am creating a test case for incident end to end process. I have used record producer to enter the end user information and created an incident. Then logged in as ITIL user and added more mandatory field information, It is failing at Business Service field, the error reads "FAILURE: Failed to set field 'business_service' to value '7abb1d8287710110b2bab996cebb35c7' because the reference is NOT valid". If I do exactly the same thing via Record insert, it works. I can't use Record Insert here for this case, right. Here are the steps I used to get the error. Kindly help.

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

Regards

Suman P.

1 ACCEPTED SOLUTION

Yes you are right. It should be cmdb_ci_service table. Same table which is referred in your Incident.

Thank you

View solution in original post

8 REPLIES 8

Prasad Pagar
Mega Sage

Hi @Servicenow User 

I think both should work in same way as ultimately what incident wants in Business service value. If you go to incident form manually and search that sys_id in Business service reference field did it get populated?

If yes then it should work via ATF too(Just check access of user you are testing with at both sides)

Thank you
Prasad

Hi @Prasad Pagar ,

How should I do it please?

find_real_file.png

Regards

Suman P.

Click on Business Service Reference icon

find_real_file.png

 find_real_file.png

It will open list and Put filter

Sysid startwith 'yourabovesysid' which failing.

Hi @Prasad Pagar ,

If you look at Step 9, I am creating Business Service it dynamically. 

find_real_file.png

Regards

Suman P.