344 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);
}
}
}

 

Installation and Configuration for Microsoft Dynamics Marketing Connector for Microsoft Dynamics CRM

Organization Service Context Class in Microsoft Dynamics CRM

OrganizationServiceContext is alternative to OrganizationServiceProxy to connect to Microsoft Dynamics CRM programmatically.

OrganizationServiceContext class can be generated by the code generation tool (CrmSvcUtil.exe).

Advantages of OrganizationServiceContext

  • It lets you track changes, manage identities and relationships.
  • Allows LINQ queries against Microsoft Dynamics CRM data.
  • Tracked changes can be commited in a single request with OrganizationServiceContext.Save method.

Generate OrganizationServiceContext class

To generate this class, provide a value for the /serviceContextName parameter when you generate early bound types.

For On-premises

CrmSvcUtil.exe /url:http://<serverName>/<organizationName>/XRMServices/2011/Organization.svc    /out:<outputFilename>.cs /username:<username> /password:<password> /domain:<domainName>    /namespace:<outputNamespace> /serviceContextName:<serviceContextName>

 

For Microsoft Dynamics CRM Online

CrmSvcUtil.exe /url:https://<organizationUrlName>.api.crm.dynamics.com/XRMServices/2011/Organization.svc    /out:<outputFilename>.cs /username:<username> /password:<password>     /namespace:<outputNamespace> /serviceContextName:<serviceContextName>

Using OrganizationServiceContext class

To instantiate the context class, you must pass the class constructor an object that implements the IOrganizationService interface.

With OrganizationService

//connection is the connection string name in config file
IOrganizationService _service = new OrganizationService("connection"); AdventureWorksCycleServiceContext context = new AdventureWorksCycleServiceContext(_service);

With OrganizationServiceProxy

//For early bound types to work correctly, they have to be enabled on the proxy.
_serviceProxy.EnableProxyTypes();
AdventureWorksCycleServiceContext context = new AdventureWorksCycleServiceContext(_serviceProxy);

After you create the organization service context object, you can begin to track create, modify, or delete entities. For example, the following code example shows how to instantiate a new contact, and then save it to a Microsoft Dynamics CRM server by using the service context object.

//  Create a new contact record;
AdventureWorksCycleServiceContext context = new AdventureWorksCycleServiceContext (_serviceProxy);
Contact contact = new Contact() 
 {
   FirstName = "Pamela",
   LastName = "Brown",
   Address1_Line1 = "123 Easy St.",
   Address1_City = "Atlanta",
   Address1_StateOrProvince = "GA",
   Address1_PostalCode = "32254",
   Telephone1 = "425-555-5678"   };
context.AddObject(contact);
context.SaveChanges();

 

 

[Job] - IBM:Package Solution Consultant: MS Dynamics AX | India

 

Comapny: IBM

Location: Bangalore, Gurgaon, Kolkata, Pune, Hyderabad | India 

Package Solution Consultant: MS Dynamics AX

Roles & Responsibilities -

•Using Dynamics AX develop and to customize the product and create reports as per the users business requirements

•Configuration and Installation required for AX and SQL mapping with AX.

•Implement Data Migration and Integration for using AX tools

•Provide technical expertise for Dynamics AX and MS development technologies and environment

•Work with AX Technical / functional team and Clients IT team to achieve the common goal of a successful implementation.

•Integration of Axapta with other products and localization for North America and European Countries.

•Basic Estimation, Design, Development, Testing, Maintenance, Optimization

Required:

• Dynamics AX Technical Consultant - 3 years

• Must have around 3+ years of exposure in AX

• Must have sufficient exposure to RTC which is present in NAV'2009

*Total work experience - 4-8 YearsLocation : Bangalore / Chennai / Hyderabad / Pune / Mumbai / Gurgaon / Kolkata

Required Technical and Professional Expertise:
Package Solution Consultant: MS Dynamics AX

Roles & Responsibilities -

•Using Dynamics AX develop and to customize the product and create reports as per the users business requirements

•Configuration and Installation required for AX and SQL mapping with AX.

Preferred Technical and Professional Experience:

•Implement Data Migration and Integration for using AX tools

•Provide technical expertise for Dynamics AX and MS development technologies and environment

•Work with AX Technical / functional team and Clients IT team to achieve the common goal of a successful implementation.

•Integration of Axapta with other products and localization for North America and European Countries.

•Basic Estimation, Design, Development, Testing, Maintenance, Optimization Required

Preferred Education:
Bachelor's Degree

 

Lead Management: Qualifying Lead To Opportunity

To qualify a Lead to Opportunity, follow these steps:

  • On the Navigation Bar, click SALES and then click LEADS.
  • In the Leads view, select and open the a lead record.
  • In the Command Bar, click Qualify. If the Duplicate Warning dialog appears, click Continue.

Microsoft Dynamics Marketing 2015 Update 1 New Features and Enhancements Training

Simplify case resolution with the Dynamics CRM interactive service hub

Pull customer information from one central place to resolve cases quickly with the Dynamics CRM interactive service hub. This video provides an overview of the interactive service hub, and shows how you'll spend less time looking for the information you need to resolve customer issues, and more time focusing on your customers.

Dynamics GP - MSFT Dynamics CRM Adapter

http://www.microsoft.com/erp : By utilizing the Microsoft Dynamics CRM Adapter Service, you can synchronize changes made in Dynamics CRM with other Microsoft Dynamics ERP solutions, such as Dynamics GP.

How to connect Microsoft Dynamics CRM to Microsoft Dynamics Marketing

Synchronize your Microsoft Dynamics Marketing and Microsoft Dynamics CRM data with the Dynamics Marketing Connector for CRM. This deep-dive video guides you through downloading and installing the connector into Dynamics CRM Online. Initial synchronization and creating custom mappings is also covered.

Learn more about Microsoft Dynamics Marketing here:

Microsoft Dynamics Marketing Playlist https://www.youtube.com/playlist?list=PLRvH_Jgj96NmWe9F6_Yi3hDp13LO_qRz5 Microsoft Dynamics Marketing Drives Results https://youtu.be/_xdDaEBZAiE

Overview of Microsoft Dynamics Marketing https://youtu.be/_yvYiOBmofw

Campaign Management in Microsoft Dynamics Marketing https://youtu.be/E-1pCHQJvPI

For even more information, visit http://www.microsoft.com/en-us/dynamics/crm-marketing.aspx and http://go.microsoft.com/fwlink/p/?LinkId=394324.

Activity Feeds Configure (3 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

Microsoft Dynamics CRM 2011: Creating a Navigation Link

Links can be established between CRM entities and external web pages. These pages can then be viewed within CRM forms. This quick demonstration will show you how.

Color Grid for Dynamics 365

Color Form for Dynamics 365