How To restrict indian user based on location
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 10:42 PM
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:
1)How to restrict the indian users on location field.
Please Help me on this....
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);
}
},
Please Help me on this....
}
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 11:43 PM
@hari kumar ,
You mean you don't want Indian users to have access to location field?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 11:50 PM
@hari kumar Would you like Indian locations to not to show up in the location drop-down?