.queryNoDomain();

ARG645
Tera Guru

What are the impacts of using queryNoDomain() in an instance where Domain Separation is NOT enabled. Will it have any impacts ? The reason I ask is because, I see a behavior related to this method where it works fine some times, and it doesn't in some cases. 

Sample Script:

var usr = new GlideRecord('sys_user');
usr.addQuery('active', 'true');
usr.addQuery('user_name', userid);
usr.queryNoDomain();

if(usr.next()) {
//further Code goes here
}

Thank you,

Aman Gurram

1 ACCEPTED SOLUTION

It should not really matter, but I would just switch back to "query" instead. 

View solution in original post

6 REPLIES 6

ARG645
Tera Guru

Thank you for the responses. Ill do some more research ad debugging and update this thread. 
Ill change it to query() anyways to be on safe side. 

Kapil Rijhwani
ServiceNow Employee
ServiceNow Employee

Hi,

According to doc :https://developer.servicenow.com/app.do#!/api_doc?v=newyork&id=r_GlideRecord-queryNoDomain_Object_Ob...

queryNoDomain() works similar to query() in case domain sepration plugin is not enabled.