The CreatorCon Call for Content is officially open! Get started here.

I am in one domain but i want to see records of another domain how can i do that?

sangeethasingh1
ServiceNow Employee
ServiceNow Employee

Hi,

I am trying to fetch records from 3 different domain where in i do not have access to those domains.

But i am using a rest api call to fetch records from these 3 domains. but i am not able to get records as i do not have access.

Please help

5 REPLIES 5

Ivano B
ServiceNow Employee
ServiceNow Employee

Hi Sangeethasingh



I suppose you can work on the visibility domain list set up. Please check the following article from the wiki



Domain Separation Setup - ServiceNow Wiki



Cheers


Robo



I tried with the below approach but still was not able to see any records from visibility domain. Do I have to do some additional


Steps to test or see if it is working or not? When I impersonate that user I see only the records in his domain none of the records


from visibility domain. Am I missing something? Please let me know.



Thanks


Sangeetha


Hi,



    I thought your requirement is to only 'fetch' records which are in another domain on querying, if that is the only requirement then you can use queryNoDomain as mentioned - gr.queryNoDomain();


But if your requirement is, all the time the user has to see these records belonging to other domain -


Create a new Group


Go to the group, add visibility domains related list


Add the domain to the visibility domain for the group


So only the users belonging to the group can only see the records



Hopefully it helps



ghsrikanth
Tera Guru

There is a GlideRecord API call, gr.queryNoDomain() can be used to momentarily disable the domain separation for that query.


With this you can access the records in other domain.


You may have to work around this with REST Call.



GlideRecord - ServiceNow Wiki



Hopefully it helps