120 Saturday, May 21, 2016 |
Suresh Maurya
Dynamics CRM Consultant at IBM

Update Record In Microsoft Dynamics CRM Using Early Bound

Update Method

To update record use IOrganizationService.Update(entitymethod.

Parameters

Name Type Comment
entity Microsoft.Xrm.Sdk.Entity Entity object to update

Output

Void

This method is implemented by OrganizationService class and OrganizationServiceContext generated in previous chapter.

Using Early Bound

To update object assign updated values to the fields of object.

//retrieve account to update
Account account = (Account)_service.Retrieve(Account.EntityLogicalName, _accountId, new ColumnSet(true));

//update the values
account.Name = "Update Name";
account.Revenue = new Money(500000);

You can get the object to update multiple ways for ex: using retrieve operation.

Object to update must have Guid in the Id field, when we retrieve object it is already present.

Now pass prepared object to the Update method.

 //pass object to update method
_service.Update(account);

 

Following example demonstarates how to update record in Microsoft Dynamics CRM using early bound

C#

using Microsoft.Xrm.Client.Services;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using System;

namespace Msxrmtools
{
class Program
{
static void Main(string[] args)
{
//"connection" = connection string name from config file"
IOrganizationService _service = new OrganizationService("connection");

//assumed guid of existing account record
Guid _accountId = new Guid("9ec0b0ec-d6c3-4b8d-bd75-435723b49f84");

//retrieve account to update
Account account = (Account)_service.Retrieve(Account.EntityLogicalName, _accountId, new ColumnSet(true));

//update the values
account.Name = "Update Name";
account.Revenue = new Money(500000);

//pass object to update method
_service.Update(account);
}
}
}

 

Microsoft Dynamics Marketing Spring & Campaign Management

Microsoft Dynamics CRM: Dynamic Marketing Lists

[Job] - Accenture: Microsoft Dynamics CRM, India

Accenture

Company: Accenture

Location: Mumbai, India

 

- Job description

"Role:- Developer
Years of experience:- 3 to 4 years
 
Must to have:-
• Experience with Microsoft CRM 2011 Modules and features related
• Experience with Microsoft CRM 2011 customizations and Configuration [Sitemap, Writing jScripts, Developing/Registering plug-ins, workflows and dialogs, SDK, importing data and CRM Deployment Manager
• Experience with developing and implementing web/windows applications with Microsoft Visual Studio .Net
• Experience with developing XML Web Services and Server components
• Experience in writing oData and Linq
• Identify build or development changes, code and peer reviews and unit testing
• Experienced working on development project Good to have:"

- Basic qualifications

Full Time Graduation

[Job] - TCS: MS CRM Solution Architect, India

Company: Tata Consultancy Services

Location: Kolkata, India

Job Title: MS CRM Solution Architect

Job ID: 89814

Experience Required: 7 - 12 Years

Job Role: Developer

Qualification Required: BACHELOR OF COMPUTER APPLICATION, BACHELOR OF COMPUTER SCIENCE, BACHELOR OF ENGINEERING

Skills Required: Enterprise Solutions and Frameworks - Microsoft Dynamics CRM

Job Description: "Candidate should have prior experience working as Technical architect. He or she also need to have CRM Domain Experience. Strong experience in microsoft technologies e.g. Net Development, WCF, C#, .NET Web Applications, XML, HTML, VS Team Foundation Server experience, MSCRM 2011 Experience, UI Customizations, Javascript, JSON, Jquery, Workflow design, SSRS, Application Integration, Web Services. The person must have strong communication and interpersonal skills, should be able to handle customers independantly. He/She must have the experience of MSCRM 2011 /2013experience and Agile methodology experience. "

Activity Feeds Installation (2 of 5): Dynamics CRM 2011

This snack explains how activity feeds allows users to stay up to date on the CRM records that are most important to them. After you complete this snack you will be able to:

• Install activity feeds

• Configure entities for activity feeds

• Disable activity feeds rules

• Auto post activity feeds

What meant by plugin?

A plug-in is custom business logic that can integrate with Microsoft Dynamics CRM 2011 to modify or augment the standard behaviour of the platform.

Microsoft CRM 2011 -- Building a Dashboard

Microsoft Dynamics CRM Sales Process Management

Watch this 7 minute video demonstration to learn how Microsoft Dynamics CRM can streamline, drive and control the complete sales cycle of your business. Contact one of our experts for more information. W: www.pa.com.au E: microsoftinfo@pa.com.au T: 1800 126 499

Recursive Workflow for Case Escalation

Update Record In Dynamics CRM - Late Bound

Following example demonstrates how to update record in dynamics crm using late bound.

Connection string 

<connectionStrings>
<add name="connection" connectionString="Url=https://org.crm.dynamics.com; Username=user@org.onmicrosoft.com; Password=password;"/>
</connectionStrings>

 C#

using Microsoft.Xrm.Client.Services;
using Microsoft.Xrm.Sdk;
using System;

namespace CrmSampleCodes
{
class Program
{
static void Main(string[] args)
{
IOrganizationService _service = new OrganizationService("connection");

Entity contact = new Entity("contact");
contact["firstname"] = "Suresh";
contact["lastname"] = "Maurya";

Console.WriteLine("Creating Contact");

Guid contactId = _service.Create(contact);

Console.WriteLine("Contact with guid=" + contactId + " created");

Console.WriteLine("updating Record");

Entity contactToUpdate = new Entity("contact");
contactToUpdate["contactid"] = contactId;
contactToUpdate["firstname"] = "Suresh-updated";
contactToUpdate["lastname"] = "Maurya-Updated";

_service.Update(contactToUpdate);

Console.WriteLine("Contact updated");
}
}
}