- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 10:38 PM
Hi All,
Requirement: I have one record producer which I want give the access for only those user which country should be Argentina ,Brazil, Colombia, Mexico in their profile i.e location.country so how we can add in available for to restrict the access for other country except above four country.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 03:32 AM
Hi @rmaroti I have updated the code as below
Let me know if this works
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 11:59 PM
it is showing error like' return true should be outside of the function"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 12:01 AM
Hi @rmaroti updated the code
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 02:47 AM
Hi @rmaroti did you test my code?
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 02:53 AM
Hi @Harish KM - even i tried your code still same thing happened logged in user who has country from one of them from condition still it is not accessible.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 02:57 AM
Hi @rmaroti can you share the field name from user table how country is looked up and also country values? I think the name of the country is not matching in the script.
var userCountry = userGr.location.country; // get user's country
gs.info("country is=="+userCountry);
Can you print the log here and provide me the values
Harish