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

Hi,

Agg got it.

So Business service getting crated properly but same record not getting linked to New incident. This seems to be issue. Can you open this step and send screenshot

find_real_file.png

Thank you @Prasad Pagar 

Actually when I analyzed my issue, I found that I was using the wrong table. I am so happy about it. Thanks for continuous support. I should have used cmdb_ci_service but I was using cmdb_ci_service_business.

Regards

Suman P.

 

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

Thank you

shloke04
Kilo Patron

Hi @Servicenow User 

Please follow the steps below to achieve your requirement:

1) Make sure that you have selected the correct table for Service which should be cmdb_ci_service and not cmdb_ci.

Also do a query and make sure you fetch the record first which you have created through portal and then try setting the values.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke