client script showing error on record producer

rmaroti
Tera Contributor

Hi Everyone,

I have requirement logged in user country should be map on "Country" variable which is single line text  on record producer but im getting the sys id of logged in user not getting logged in user country name.

 

please see below screen shot.

 

please let me know what i need to change.

 

11 REPLIES 11

@Ivan Betev  I tried above one method as well but showing the error "There is a JavaScript error in your browser console"

@rmaroti  and if you open developer tools in your browser and check the error in the console? What does it say?

Sandeep Rajput
Tera Patron
Tera Patron

@rmaroti In your script include replace line number 12 with the following line.

 

var country = usr.location.country+'';

script include.png

 

@Sandeep Rajput  I checked it in background script its working and getting result as I expected but there will be something issue in client script.

@rmaroti In your client script change the replace the line number 8 with the following.

var coe = response.responseXML.documentElement.getAttribute("answer");

Client Script (1).png