Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Incident form shouldn't allow user to put the same ID for Change request and Caused by change fields

BNaveenM
Tera Contributor

Hello all,

I want to implement ATF - on the incident form, where user shouldn't be able to put the same ID for Change request and Caused by change fields.

If we give some X value to the  change request field and the same value to the Caused by change filed as well, it should through an error as a pop up telling "you cant give same values to both fields".

I was able to set some value for the Change request as a first step, while setting the same value to Caused by change field, It is not taking value at all and giving the below while we run ATF.
"Failed to set field 'caused_by' to value 'XXXX' because the reference is NOT valid".

Please help me how can I resolve this.

1 REPLY 1

Shaqeel
Mega Sage

Hi @BNaveenM 

 

This is because you the field is reference field, and you are not passing the correct reference.

Could you share the set field value step screenshot.

 

I think, the user you are impersonating that user does not have that reference value.

kindly check the reference while impersonating to that user.

 

regards

Shql


***********************************************************************************************************************
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