Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Inserting Value in lookup field of Lead object via API

$
0
0

Hi,

I am using this to create https://disco.crm11.dynamics.com/XRMServices/2011/Discovery.svc Lead via API. The field lead["ss_country"] is lookup field so how can i insert value in this field. Can anyone help on the same please?

Below is my code

ServerConnection serverConnect = new ServerConnection();
ServerConnection.Configuration config = serverConnect.GetServerConfiguration();

using (_serviceProxy = ServerConnection.GetOrganizationProxy(config))
{

_serviceProxy.EnableProxyTypes();
Entity lead = new Entity("lead");

lead["firstname"] = c.firstname;
lead["lastname"] = c.lastname;

lead["ss_country"] = null;



_lead1Id = _serviceProxy.Create(lead);

return _lead1Id.ToString();
}


Viewing all articles
Browse latest Browse all 79901

Trending Articles



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