13.08.2009, 15:05 | #1 |
Участник
|
jamesdowney: Pulling Attribute Values into Variables from FetchXML Result
Источник: http://www.jamesdowney.net/blog/post...ML-Result.aspx
============== Over the years, I've recieved several emails from users of FetchXML Builder about how to pull the data retreived by CrmService Fetch method into variables. When you use FetchXML Builder, you will see rather quickly that the results are returned as XML so it makes sense to use the XmlDocument class to manipulate this data. So start by placing a "using System.Xml;" clause at the top of your C# file and modify the code below to fit your needs. string result = service.Fetch(fetchXML); string attributevalue; XmlDocument doc = new XmlDocument(); doc.LoadXml(result); foreach(XmlNode node in doc.DocumentElement.ChildNodes) { attributevalue = node.SelectSingleNode("mycrmattribute").InnerText; } Источник: http://www.jamesdowney.net/blog/post...ML-Result.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|