Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Problem solve Field names being different in dev and test environment

DevtoSME
Giga Guru

I encountered an issue where the catalog task "requested_for" form field that i created a client script for has different field name in test and my client script wont work for it in test. What's another way to approach this to display a field message.

 

my client script (using a script include) is used to display a field message if a user has a choice field selected on the user table and display it on child tables extended form the task table.

 

2 REPLIES 2

Kieran Anson
Kilo Patron

You should look to align your environments, rather than develop a workaround. The field in dev is the "correct" way to do it, since the introduction of requsted_for on sc_req_item

Kris Moncada
Kilo Sage

Hi @DevtoSME ,

 

The screenshots for DEV and TEST appear to be for two different fields. For example,  Dev is showing Requested For (which references "sys_user"), and TEST is showing the field Requested (note the column name "requested", which references "sc_request").

 

The Requested For (requested_for) field is default out of the box, will should exist in all your environments.  If it doesn't then there's some of other developer making global catastrophic changes.

 

Hope that helps.