how to check if a user having domain visibility to add him in requested for?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2018 02:24 AM
Hello,
I have scripted rest web service which creates request in various domains
some user belong to one particular domain and they have other domain visibility which is set in related list of user table(domain visibility) i have user sent in json while creating request
i have a validation made that check user domain in user table and allows him to create request in that domain itself,now i need to work on additional condition that if user has other domain visibility it should allow him to create request
plz suggest
code will be helpful
thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2018 09:48 PM
here i am concerned about requested for field but not the user who authenticates

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2018 04:12 PM
I see, is this a scripted REST API? I am actually not even sure how you would set the domain in the out of box service catalog API as it only allows users to request as themselves and seems to create everything in the default domain. If it is a scripted API you would have to query the table sys_user_visibility, where sys_domain is the domain and user is the requested for user.
In my service catalog I have created a business rule to set the company of the request to the requested for user's company every time, which takes care of the domain. I have never had a requirement to create a request for another user, and then put it in a domain other than their domain. But if you share your code I'd be happy to take a look.