R
roger
I am customizing MS CRM 3.0. I am fairly new to C# and know very
little about Xpath.
I need to read the the 4th line of the XML below (value node) and check
the type. If the type is "account", I need to change the type to
"contact" and replace the GUID with the value in my contactID variable.
Can anybody help this newbie?
Here is the XML:
<BusinessEntity xsi:type="DynamicEntity" Name="opportunity"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.microsoft.com/crm/2006/WebServices">
<Properties>
</Properties><Property xsi:type="CustomerProperty"
Name="customerid">
<Value
type="account">{3434B094-9949-DB11-BA2F-0004765B94A0}</Value>
</Property>
<Property xsi:type="StringProperty" Name="name">
<Value>tester</Value>
</Property>
<Property xsi:type="CrmBooleanProperty"
Name="isrevenuesystemcalculated">
<Value>1</Value>
</Property>
<Property xsi:type="PicklistProperty" Name="opportunityratingcode">
<Value>2</Value>
</Property>
<Property xsi:type="OwnerProperty" Name="ownerid">
<Value
type="systemuser">{C2B731F4-6F16-DB11-A3CD-000472EB94C0}</Value>
</Property><Property xsi:type="StatusProperty" Name="statuscode">
<Value>1</Value>
</Property>
<Property type="LookupProperty" Name="defaultpricelevelid" >
<Value>{b9657b71-333d-db11-9bad-000446eb91a0}</Value>
</Property>
</Properties>
</BusinessEntity>
Thank you
little about Xpath.
I need to read the the 4th line of the XML below (value node) and check
the type. If the type is "account", I need to change the type to
"contact" and replace the GUID with the value in my contactID variable.
Can anybody help this newbie?
Here is the XML:
<BusinessEntity xsi:type="DynamicEntity" Name="opportunity"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.microsoft.com/crm/2006/WebServices">
<Properties>
</Properties><Property xsi:type="CustomerProperty"
Name="customerid">
<Value
type="account">{3434B094-9949-DB11-BA2F-0004765B94A0}</Value>
</Property>
<Property xsi:type="StringProperty" Name="name">
<Value>tester</Value>
</Property>
<Property xsi:type="CrmBooleanProperty"
Name="isrevenuesystemcalculated">
<Value>1</Value>
</Property>
<Property xsi:type="PicklistProperty" Name="opportunityratingcode">
<Value>2</Value>
</Property>
<Property xsi:type="OwnerProperty" Name="ownerid">
<Value
type="systemuser">{C2B731F4-6F16-DB11-A3CD-000472EB94C0}</Value>
</Property><Property xsi:type="StatusProperty" Name="statuscode">
<Value>1</Value>
</Property>
<Property type="LookupProperty" Name="defaultpricelevelid" >
<Value>{b9657b71-333d-db11-9bad-000446eb91a0}</Value>
</Property>
</Properties>
</BusinessEntity>
Thank you