i want to restrict the user from accessing record producer on ESC portal based on the users company
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-08-2024 06:00 AM
I have a requirement where we have a record producer caller high severity placed on ESC portal
i want that record producer to be made available only when the logged in user company is EA Holding
i tried creating a user criteria setting company value to EA Holding , but still that doesn't work in ESc portal i dont know why .
can anyone help me how to restrict user from accessing that high severity record producer when his company is not EA Holding
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-08-2024 06:31 AM
Hi Kiran,
I can suggest a couple of things to investigate:
- If you are getting the user data via script the documentation says to make sure that you are referencing user_id and not gs.getUser().
- Have you tested your criteria in the User Criteria Diagnostics? That will tell you who can or can't access with some explanation of why.
If the above doesn't get you to resolution, please include the criteria record so that we can better guide you.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-08-2024 07:09 AM
Hii
these are the user critierias which i created and both are not working
i tried one without script it failed
i tried one with script it again failed i dont know what's wrong
this is without script
i did check for diagnostics
this user belongs to EA Holding company
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-08-2024 07:38 AM
Hi Kiran,
The basic setup against company should give you what you need. I did a similar setup and it worked no problem. The only things I can think of are:
- Make sure that the user against whom you are testing has the correct company identified and meets any other criteria (e.g. if you have not external active, make sure the user is internal)
- Make sure that you have the criteria record under Available For and not Not Available For
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-08-2024 07:21 AM
You can try the below script use before business rule and let me know
(function executeRule(current, previous /*, g_scratchpad*/) {
var userCompany = gs.getUser().getCompany().getName();
if (userCompany != "EA Holding") {
// Restrict access to the record producer
current.active = false;
}
})(current, previous);
Thanks and Regards
Sai Venkatesh