web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Error While retrieving regardingobjectid from activitypointer using Fetch XML in Web API of dynamics CRM 2016

(0) ShareShare
ReportReport
Posted on by 20

Hi, I have been trying to retrieve regardingobjectid from activitypointer using Fetch XML in web api of dynamics CRM but it is generating an error that it is unable to retrieve field named as regardingobjectid. Please help me, I am stuck here. Thank you
Here is the Fetch xml query:

    fetchxml = "<fetch mapping='logical' count='25' page='" + page + "' paging-cookie='" + pageCookie + "' >" +  
                          "<entity name='activitypointer' >" +  
                          "<attribute name='description' />" +  
                          "<attribute name='subject' />" +  
                          " <attribute name='activitytypecode' />" +  
                          " <attribute name='createdby' />" +  
                          " <attribute name='regardingobjectid' />" +  
                          " <attribute name='activityid' />" +  
                          " <attribute name='statecode' />" +  
                          " <attribute name='createdon' />" +  
                          " <attribute name='modifiedon' />" +  
                          "  <filter type='and' >" + datequery +  
                          "<condition   attribute='activitytypecode' operator='in'>" +  
                          " <value>4212</value>" +  
                          "  <value>4210</value>" +  
                          "  <value>4202</value>" +  
                          "  <value>4207</value>" +  
                          "  <value>4201</value>" +  
                          "  <value>10034</value>" +  
                          "  </condition>" +  
                          " <condition entityname='activityparty'   attribute='participationtypemask' operator='in' >" +  
                          " <value>2</value>" +  
                         "  <value>8</value>" +  
                         "  <value>1</value>" +  
                         " </condition>" + retrieveCondition +  
                          "  </filter>" +  
                          "  <order attribute='statecode' descending='true' />"   +	//open opportunities to appear first
                          "  <order attribute='modifiedon' descending='true' />"   +
                  //        " <order attribute='activityid' />" +  
                          "  <link-entity name='activityparty' from='activityid'   to='activityid' link-type='inner' >" +  
                          "    <attribute name='partyid' />" +  
                          "    <attribute name='participationtypemask' />" +  
                          "  </link-entity>" +  
                          " </entity>" +  
                          "</fetch>";  
                req.open("GET", encodeURI(Xrm.Page.context.getClientUrl() +   "/api/data/v8.0/activitypointers?fetchXml=" + encodeURI(fetchXml)), true);  


*This post is locked for comments

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans