How To restrict indian user based on location

hari kumar
Tera Contributor

 

varialbe name: cr_location

onchange script:

function onChange(control, oldValue, newValue, isLoading) {
if (newValue == '') {
        return;
    }
var ga = new GlideAjax('CTVFitPCDetails');
ga.addParam('sysparm_name', 'getLocationDetails');
ga.addParam('sysparm_location', newValue);
ga.getXMLAnswer(function(answer){
var response = JSON.parse(answer);
//alert(JSON.stringify(response));
 
 
g_form.setValue('cr_street_address', response.street);
g_form.setValue('cr_city', response.city);
g_form.setValue('cr_state', response.state);
g_form.setValue('cr_postal_code', response.code);
g_form.setValue('cr_shipping_country', response.country);
});

Script Include:
  getLocationDetails: function() {
        var location = this.getParameter('sysparm_location');
        var gr = new GlideRecord('cmn_location');
 
gr.get(location);
 
var response = {};
 
        response.street = gr.street.toString();
        response.city = gr.city.toString();
        response.state = gr.state.toString();
        response.code = gr.zip.toString();
        response.country = gr.u_core_country.toString();
 
 
        return JSON.stringify(response);
}
    },
 
1)How to restrict the indian users on location field.


Please Help me on this....


 
 
 
 
}
2 REPLIES 2

Sonam Tiwari
Tera Guru

@hari kumar ,

You mean you don't want Indian users to have access to location field?

Sandeep Rajput
Tera Patron
Tera Patron

@hari kumar Would you like Indian locations to not to show up in the location drop-down?