cancel
Showing results for 
Search instead for 
Did you mean: 
markthughes
Nintex Newbie

getting an error with query list in another site using caml query: Failed to query list data. Object reference not set to an instance of an object.

Jump to solution

i am getting an error in the workflow when trying to query a list in another site inside the same site collection using caml query and other site, when i log the xml it all looks good. 

here is the error:  Failed to query list data. Object reference not set to an instance of an object.

here is the xml for the caml query

<Query>

<Lists>

<List ID="{8DEC397E-694D-43FD-8496-EAA048F38ED5}"/>

</Lists>

<Where>

<Eq>

<FieldRef Name="EmployeeId"/>

<Value Type="Text">10535</Value>

</Eq>

</Where>

</Query>

0 Kudos
Reply
6 Replies
burkslm
Nintex Newbie

Re: getting an error with query list in another site using caml query: Failed to query list data. Object reference not set to an instance of an object.

Jump to solution

Crazy question...what happens if you try doing the exact same thing but without the CAML query. See what happens if you use UI instead.

0 Kudos
Reply
markthughes
Nintex Newbie

Re: getting an error with query list in another site using caml query: Failed to query list data. Object reference not set to an instance of an object.

Jump to solution

you cant query a list in another site unless you do a caml query

0 Kudos
Reply
burkslm
Nintex Newbie

Re: getting an error with query list in another site using caml query: Failed to query list data. Object reference not set to an instance of an object.

Jump to solution

What about with the 'Call Web Service'?

0 Kudos
Reply
markthughes
Nintex Newbie

Re: getting an error with query list in another site using caml query: Failed to query list data. Object reference not set to an instance of an object.

Jump to solution

ok i did the webservice, had to capitalize q in QueryOptions in the soap editor mode

0 Kudos
Reply
Automation Master
Automation Master

Re: getting an error with query list in another site using caml query: Failed to query list data. Object reference not set to an instance of an object.

Jump to solution

In your CAML query the viewfields are missing, for example :

<Query>

<Lists>

     <List ID="{8DEC397E-694D-43FD-8496-EAA048F38ED5}"/>

</Lists>

<ViewFields>

     <FieldRef Name="Title"/>

</ViewFields>

<Where>

     <Eq>

          <FieldRef Name="EmployeeId"/>

          <Value Type="Text">10535</Value>

     </Eq>

</Where>

</Query>

Hope this helps

Reply
markthughes
Nintex Newbie

Re: getting an error with query list in another site using caml query: Failed to query list data. Object reference not set to an instance of an object.

Jump to solution

thanks that worked, didnt think i needed it since it had a return field and store in under that in the UI, thanks!

0 Kudos
Reply