Restrict users from raising request when requested for user doesn't have Manager for their profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2023 08:36 AM
How can we restrict users from raising a request from portal when the Requested for user doesn't have Manager associated against their profile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2023 11:16 AM
Hi
Could you please elaborate your question. Whether you have to restrict it for a single catalog item/record producer or the entire requests available in portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2023 12:06 AM
Hi,
The requirement is for a single catalog item. If 'Requested for' user doesn't have manager then user should have an alert message and should not be able to raise the request.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2023 01:56 AM
Hi Please create a user criteria with the following script to restrict the users with no managers. SO the request itself will not be available for him in the UI.
You can create a user criteria by creating a new record under the related list Available for.
answer = checkIfManagerNotempty();
function checkIfManagerNotempty(){
var gr = new GlideRecord('sys_user');
gr.addEncodedQuery('managerISNOTEMPTY');
gr.query();
return gr.hasNext();
}
Thanks!!
Ram
Please mark this as Helpful/Correct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2023 02:24 AM
Hi Ram,
I don't want to have user criteria because, the restriction is for just one category/subcategory in the catalog item. The form with other categories should still be visible for everyone.
Thanks,
Mounika