Quantcast
Channel: Forum CRM Development
Viewing all articles
Browse latest Browse all 1000

Convert XML code from Account to Lead

$
0
0

Hello, i have the following XML Code that adds a contact in the crm dynamics 2011:

<s:Body><Create xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services"><entity xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><b:Attributes xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"><b:KeyValuePairOfstringanyType><c:key>name</c:key><c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">Final Test 1</c:value></b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType><c:key>emailaddress1</c:key><c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">test@test.com</c:value></b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType><c:key>address1_city</c:key><c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">City Here</c:value></b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType><c:key>telephone1</c:key><c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">111111</c:value></b:KeyValuePairOfstringanyType></b:Attributes><b:EntityState i:nil="true"/><b:FormattedValues xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/><b:Id>00000000-0000-0000-0000-000000000000</b:Id><b:LogicalName>account</b:LogicalName><b:RelatedEntities xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/></entity></Create></s:Body>

It's working well, except that it's not what i actually want (I found it during researches).

What i want is to create a new Lead, not Account.

How can i modify this code to achieve that?

Thanks everyone.



Viewing all articles
Browse latest Browse all 1000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>