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.

USA is no longer accepted in the sys_user.country field

Renee-17
Tera Guru

What is causing sys_user.country field to only accept United States and not USA in sys_user table country field?  It appears to have started with Xanadu Patch 9. 

1 ACCEPTED SOLUTION

Chaitanya ILCR
Mega Patron

Hi @Renee-17 ,

 

we have faced the similar issue 

there are two BRs added in the patch (Prevent invalid country code & Prevent invalid language code)

check if those are the once causing the issue

 

as per that BR (US should be the choice value not USA)

ChaitanyaILCR_0-1753117360422.png

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

View solution in original post

6 REPLIES 6

If the query of core_country had this instead, it should work for us since we are using USA and not US for country. 

 

coreCountryGR = new GlideRecord("core_country"); 
var query = coreCountryGR.addQuery("iso3166_2", country);
query.addOrCondition("iso3166_3", country);
coreCountryGR.query(); 
if(coreCountryGR.getRowCount() == 0) { 
      gs.warn("Attempt to insert/update an invalid value for sys_user.country: " + country); 
     current.setAbortAction(true); 
} 

   

Hi @Renee-17 ,

 

That's what we had done 😀(deactivated those 2 BRs)

 

If your issue is resolved 

Could you please close this thread by accepting the solution 

 

Please mark my answer as helpful/correct if it resolves your query.

 

Regards,

Chaitanya