Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8594833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:17:24+00:00 2026-06-12T00:17:24+00:00

This code receives a ATOM feed from the CRM 2011 REST Service API. It

  • 0

This code receives a ATOM feed from the CRM 2011 REST Service API. It works but it seem’s very verbose but I can’t find a more efficient way to consume the response. I would appreciate any suggestions or if my question needs to be more specific I would ask is this the recommended approach? I have found nothing on this in the CRM SDK or MSDN so far.

XmlDocument xml = new XmlDocument();
xml = xrm.GetXMLData(query);
XDocument xdoc = XDocument.Parse(xml.OuterXml);
XNamespace d = "http://schemas.microsoft.com/ado/2007/08/dataservices";
XNamespace m = "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";
XNamespace atom = "http://www.w3.org/2005/Atom";
foreach (var entity in xdoc.Descendants(atom + "entry"))
{
    var psi = entity.Element(atom + "content")
                     .Element(m + "properties")
                      .Element(d + "new_name");

    var status = entity.Element(atom + "content")
                        .Element(m + "properties")
                         .Element(d + "new_ExternalStatus");

    UpdateExternalDBStatus(psi.Value, status.Value);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:17:25+00:00Added an answer on June 12, 2026 at 12:17 am

    From memory the API is OData based. Due to the design of OData (and the metadata it provides) you can actually use web-service style “Add Servicde reference” or the command line tools and Visual Studio will automatically construct the classes required for you to query the service. OData also provides an integrated query mechanism, so the classes also provide a LINQ style interface if required.

    This blog post explains consuming OData in a little more detail: http://crdevelopment.net/2011/06/11/ebayodat/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This code : http://jsfiddle.net/bYtTG/1/ Works as I want in FF, chrome and opera, but
I wrote this code to reverse strings. It works well, but when I enter
This code is the core of a much larger script that works great in
This code is not pretty, but I want to print out the last generated
This code comes from: http://code.activestate.com/recipes/577090-file-encryption-using-stream-cipher/ import sys import random if len(sys.argv) != 4: print
So, I have this code that grabs a bunch of data from the database,
This code receives the GZip-encoded string. How can I decode it? Stream stream =
I have this coding inside my java file . This code basically receives an
I have this code: <?php $result_array1 = array(); $sql1 = SELECT * FROM `test_thing`;
Hi I am following the code from this link: Capture and log the response

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.