Posts Tagged ‘WebService’

 Step 1. Step 2. Step 3. Let me explain the scenario… Suppose we have City Lookup on Lead entity and we want to populate Region (Lookup), State (Lookup) and Zone (Lookup) on selection of particular City from City Lookup. You need to write below code on OnChange event of City Lookup field. if(crmForm.all.new_cityid.DataValue !=null) { [...]

// Set up the CRM Service. CrmAuthenticationToken token = new CrmAuthenticationToken(); // You can use enums.cs from the SDK\Helpers folder to get the enumeration for AD Authentication. token.AuthenticationType = 0; token.OrganizationName =”AdventureWorksCycle”; CrmService service = new CrmService(); service.Url =”http://<servername>:<port>/mscrmservices/2007/crmservice. asmx”; service.CrmAuthenticationTokenValue = token; service.Credentials = System.Net.CredentialCache.DefaultCredentials; // Create the contact object. contact contact = new [...]

// Deletes the Contact // The EntityName indicates the // EntityType of the Object being deleted. service.Delete(EntityName.contact.ToString(), myContact.contactid);

// Set up the CRM Service. CrmAuthenticationToken token = new CrmAuthenticationToken(); // You can use enums.cs from the SDK\Helpers folder to get the enumeration for AD Authentication. token.AuthenticationType = 0; token.OrganizationName =”AdventureWorksCycle”; CrmService service = new CrmService(); service.Url =”http://<servername>:<port>/mscrmservices/2007/crmservice. asmx”; service.CrmAuthenticationTokenValue = token; service.Credentials = System.Net.CredentialCache.DefaultCredentials; // Create the column set object that indicates the [...]

CrmDiscovery service is a global installable level service that allow the caller to determine the correct organization and URL for his/her need. Below example show how to create and configure CrmDiscoveryService Web Service proxy.   // Create and configure the CrmDiscoveryService Web service proxy. CrmDiscoveryService discoveryService = new CrmDiscoveryService(); discoveryService.UseDefaultCredentials = true; discoveryService.Url =”http://localhost/MSCRMServices/2007/AD/CrmDiscoveryServic e.asmx”; [...]

Here we will be calling the default helloworld webservice that is already created for us when we open a asp.net webservice project template in Visual Studio. We’ll just have a textbox(html control) which will display us the Hello World! response returned from the web service. This is the step we need to follow 1) Create [...]