Get Opportunity Task Information using FetechXML

private EntityCollection GetOpportunityTaskCollections(IOrganizationService service, Guid _opportunityid)
        {
            string fxml =
                @"<fetch mapping='logical' version='1.0'>" +
	                "<entity name='task'>" +
		                "<attribute name='activityid' />" +
		                "<attribute name='description' />" +
		                "<attribute name='ownerid' />" +
		                "<attribute name='scheduledend' />" +
		                "<attribute name='statecode' />" +
		                "<attribute name='subject' />" +
		                    "<filter>" +
                                "<condition attribute='regardingobjectid' operator='eq' value='" + _opportunityid + "' />" +
		                    "</filter>" +
                    "</entity>" +
                "</fetch>";


            FetchXmlToQueryExpressionRequest fxmlReq = new FetchXmlToQueryExpressionRequest() { FetchXml = fxml };
            FetchXmlToQueryExpressionResponse expression = (FetchXmlToQueryExpressionResponse)service.Execute(fxmlReq);

            var request = new RetrieveMultipleRequest { Query = expression.Query };
            EntityCollection entityList = ((RetrieveMultipleResponse)service.Execute(request)).EntityCollection;
            return entityList;

        }
This entry was posted in MS Dynamic CRM 2011. Bookmark the permalink.

11 Responses to Get Opportunity Task Information using FetechXML

  1. PPI claim says:

    Almost all I can comment on is, I don’t know what to really say! Except certainly, for the excellent tips that happen to be shared using this blog. I can think of a trillion fun strategies to read the content on this site. I think I will finally take action making use of your tips on that matter I could not have been able to deal with alone. You were so thoughtful to allow me to be one of those to profit from your practical information. Please realize how a great deal I enjoy the whole thing.

  2. I couldn’t have really asked for a much better blog. You happen to be always there to present excellent information, going straight to the point for straightforward understanding of your visitors. You’re surely a terrific professional in this area. Many thanks for currently being there for folks like me.

  3. Could not thank you more than enough for the blogposts on your web site. I know you place a lot of time and energy into these and really hope you know how considerably I enjoy it. I hope I am able to do precisely the same for someone else at some point.

  4. Just about all I can express is, I don’t know what to comment! Except of course, for the superb tips that happen to be shared on this blog. I could think of a zillion fun strategies to read the posts on this site. I’m sure I will eventually make a move using your tips on those issues I could not have been able to take care of alone. You’re so clever to allow me to be one of those to learn from your beneficial information. Please know how a great deal I am thankful.

  5. I merely wanted to inform you how much I actually appreciate every thing you’ve contributed to help enhance the lives of men and women in this subject material. Through your current articles, I’ve really gone through just a novice to a pro in the area. It is truly a gratitude to your work. Thanks

  6. I couldn’t currently have asked for a more rewarding blog. You are ever present to provide excellent tips, going directly to the point for simple understanding of your readers. You’re really a terrific professional in this matter. Many thanks for remaining there for people like me.

  7. Most I can say is, I don’t know what to really say! Except needless to say, for the fantastic tips which are shared on this blog. I can think of a trillion fun ways to read the articles or blog posts on this site. I think I will at last make a move with your tips on areas I could never have been able to address alone. You had been so careful to permit me to be one of those to benefit from your valuable information. Please recognize how great I am thankful.

  8. jewelry says:

    We so appreciate your website post. There are actually lots of tactics we could put it to proper use while using a minimum of effort on time and money. Thank you very much pertaining to helping have the post respond to many issues we have got before now.

  9. Say thanks a lot for your time to have put these things together on this weblog. Michael and I very much loved your input through your own articles over certain things. I’m sure that you have many demands on your schedule so the fact that a person like you took the maximum amount of time just like you did to help people really like us by this article is actually highly prized.

  10. We really appreciate your site post. You can find dozens of ways we could put it to very good use with a minimum of effort with time and money. Thank you really with regard to helping make the post answer many questions we have experienced before now.

  11. tiling says:

    The recommendations you contributed here are really valuable. It had been such an exciting surprise to see that waiting for me immediately i woke up now. They are usually to the point as well as simple to interpret. Warm regards for the useful ideas you’ve shared here.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>