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

Associate Records in Dynamics CRM - Late Bound

Following example demonstrates how to associate contact to account in dynamics crm using late bound

public static void AssociateRecord(EntityReference contact, EntityReference account, IOrganizationService service)
{
// Creating EntityReferenceCollection for the Contact
EntityReferenceCollection relatedEntities = new EntityReferenceCollection();

// Add the related entity contact
relatedEntities.Add(contact);

// Add the Account Contact relationship schema name
Relationship relationship = new Relationship("contact_customer_accounts");

// Associate the contact record to Account
service.Associate(account.LogicalName, account.Id, relationship, relatedEntities);
}

Dynamics CRM2011 Goals Introduction

Dynamics CRM 2011 has an important new feature area -- "Goals" -- that lets you define targets and track progress against them. I think it's one of the most important new features, but there's a bit of a learning curve. Here's an introduction to Goals and Goal Metrics, using common examples from sales and marketing scenarios.

[Job] - IBM: Package Solution Consultant: MS Dynamics AX | 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 Years

Location : Bangalore / Chennai / Hyderabad / Pune / Mumbai / Gurgaon / Kolkata

Required Technical and Professional Expertise:
Package Solution Consultant: MS Dynamics AXRoles & 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

Microsoft Dynamics CRM 2015 Cortana Demonstration

Microsoft Dynamics CRM 2011 - Strategy for Lowering CoGs

CRM 2013 Quick Tip: Edited records are saved automatically in Microsoft Dynamics CRM

[Job] - Microsoft Dynamics CRM Architect, Denmark

IBM Hiring for Microsoft Dynamics CRM Architect

Location: Any, Denmark

Category: Consultant

What does it take? You should :
 

  • be willing to work across our European practice on client sites
  • be a self-starter with the ability to work within an operating framework
  • have a customer oriented attitude and excellent interpersonal skills
  • have a passion for new technology and seamless business flow with CRM technologies
  • have demonstrated expertise in project estimation and phase breakdown of work programs
  • be knowledgeable about working with online, on-premises or hybrid solutions



Required Technical and Professional Expertise:

  • Microsoft Dynamics CRM implementation experience from senior positions
  • Proven consulting expertise with a broad array of industry exposure
  • Multiple Certifications in Dynamics CRM (either technical or functional certification/s)
  • A sound overall understanding of the greater systems around CRM
  • Master's Degree
  • At least 5 years experience in Microsoft Dynamics CRM
  • At least 5 years experience in Consulting
  • English: Fluent
  • Danish: Intermediate



Preferred Technical and Professional Experience:

Additional European languages will put you at an advantage.
As will SQL or JavaScript Skills.

Preferred Education:
Master's Degree

Link

Create Record In Dynamics CRM Using Early Bound

Following example demonstrates how to create record in dynamics crm using Early 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");

// Instantiate an account object.
Account account = new Account { Name = "Fourth Coffee" };

// Create an account record named Fourth Coffee.
Guid _accountId = _service.Create(account);
Console.Write("{0} {1} created, ", account.LogicalName, account.Name);

}

}
}

Microsoft Dynamics CRM Online 2015 Update 1 - Yammer Integration New Features

What are the types of ribbons?

  1. Application ribbon:
    1. The applicationRibbon.xml file contains the definition of the core application ribbons.
  2. Entity ribbon.
    1. The entity grid ribbon is a collection of tabs that have an Id attribute value beginning with Mscrm.HomepageGrid.<entity logical name>.
  3. SubGrid Ribbons
    1. When a list of records for a different entity is displayed within a sub grid on the form of another entity or in a chart, the ribbon will change when the user places the cursor in the grid. A contextual group with the label List Tools is displayed. The single tab included in that contextual group will have the plural display name of the entity.
    2. The entity sub grid ribbon is a contextual group with a collection of tabs that have an Id attribute value beginning with Mscrm.SubGrid.<entity logical name>. For example, the tab with the text "Accounts" on account entity sub grid is Mscrm.SubGrid.account.MainTab.
  4. Form Ribbons
    1. Each entity form can have a specific ribbon definition. In the exported customizations.xml file, you must add your modified <RibbonDiffXml> (FormXml) to this location://ImportExportXml/Entities/Entity/FormXml/forms/systemform/form/RibbonDiffXml.
  5. Other Ribbons
    1. Several other special purpose ribbon tabs and a contextual group are defined byMicrosoft Dynamics CRM. Each tab is associated with a specific <TabDisplayRule> (RibbonDiffXml) that controls when they will display. The following table lists these tabs.

      Tab

      Root Id

      Description

      Web Resource Edit page tab.

      Mscrm.WebResourceEditTab

      Displays when editing Web resources within a solution.

      Form Editor tab

      Mscrm.FormEditorTab

      Provides Save, Edit, Select, and View groups of actions for entity forms.

      Form Editor Insert tab

      Mscrm.FormEditorInsertTab

      Provides buttons to insert Sections, Tabs, and Controls in entity forms.

      Dashboard Homepage tab

      Mscrm.DashboardTab

      Displays in the Workplace area.

      Visualization Tools Contextual Group

      Mscrm.VisualizationTools

      Displays when the New Chart button is clicked on the Charts tab displayed in the entity grid ribbon.

      AptbookTab Homepage tab

      Mscrm.AptbookTab

      Displays when viewing the Service Calendar in the Service area.

      Advanced Find tab

      Mscrm.AdvancedFind

      Displays in the Advanced Find window.

      Dashboard Editor tab

      Mscrm.DashboardEditorTab

      Displays when editing a dashboard.

      Documents tab

      Mscrm.DocumentsTab

      Displays if SharePoint integration has been enabled for the organization.

      Chart Editor tab

      Mscrm.VisualizationDesignerTab

      Displays when editing a chart from the solutions window.

      Search Tools Contextual Group

      Mscrm.ArticleSearch

      Displays when viewing the KBarticle entity.

Email Router Demystified in MS CRM Part -2

Troubleshooting Outgoing email issues

To do this, we need to reference the mail flow diagrams shown in the Explanation post previously.  We’ll first cover the Outgoing portion of the Email Router.

Troubleshooting Outgoing email issues is the not a difficult part of the Email Router to troubleshoot.  The reason is that there are only two different configuration options, SMTP or Exchange Online.  Realistically, you troubleshoot these the same way.  Obviously we have some restrictions during the troubleshooting steps when working with Exchange Online but these should be pretty obvious.  Let’s go ahead and get into troubleshooting at this point.

 

The first thing to know about troubleshooting the Email Router is to remember the traffic flow.  This was shown in the second post of this series but I have included it here as well:

 

Each step represents a potential break point.  The key to troubleshooting is to understand where the error occurs and what the error is telling you.  So how can we determine where the issue lies?

 

The first step to this is to understand, what’s the state of the email within CRM?  There are three status the email can be when in CRM. 

  1. Pending Send
  2. Sending
  3. Sent

What’s an easy way of understanding what emails are in which state?  The typical recommendation I have made to our customers is to use Advanced Find on the E-mail Messages entity.  When building your Advanced Find, you will want to ensure you have, at minimum, the following columns: Subject, From, To, Status Reason, No of Delivery Attempts.

Note: The one thing I want to ensure is pointed out is the last column of No. Of Delivery Attempts.  This tells us how many times the Email Router has tried to send the email.  Anytime it goes from Pending Send to Sending, it increments this attempt by 1.  We delay sending emails that have higher Delivery Attempt counts.

Each of the email statuses signify a different step within the mail flow diagram above.  Let’s review each of these now:

  1. Pending Send: Pending Send means that the email router has not processed this email message yet or there was an error when it did process it and put it back into a pending send status to try to send it again at a different time.  The key to knowing how to differentiate these is to look at the Advanced Find.
     
    One Pending email with the Subject of “Failing Email” shows that the router has tried sending the email five times and it’s still unable to do so since the Status Reason is still Pending Send.  This tells me that there is an issue between the Email Router and the Outgoing service (SMTP or Exchange Online).  The email router was able to retrieve the message from the CRM server, validated the user information within CRM, and submitted it to the Outgoing service to be delivered.   For some reason, the outgoing attempt failed for this email and I can review the Event Viewer Application Logs for more information.   The other email in a Pending Send state, shows the delivery attempts as 0.  This means the router has not yet picked up this email for processing.  This could be due to quite a few reasons. 
    1. The User’s profile does not list E-mail Router in the Email Access Configuration for Outgoing:
    2. The user is not listed in the Email Router Configuration Manager after clicking on Load Data:

      This could be due to the Email Access Configuration for the user not set to Email Router for Outgoing or the user’s email address has not been approved.
    3. The user does have Email Access Configuration set to Outgoing and is in the Email Router Configuration Manager but the user’s GUID <UserId> is not present in the Microsoft.Crm.Tools.EmailAgent.xml file:

      In this case, the user’s GUID is B8DD579B-501D-E211-AA2E-00155D51F43.  The reason could be that after the user’s settings were changed to Email Router (Email Access Configuration) no one went back in the Email Router Configuration Manager and clicked on Load Data and Publish.
    4. The user’s Personal Options do not allow the Email Router to do processing on their behalf.

      CRM 2011:

      CRM 2013:

      The setting for “Allow other Microsoft Dynamics CRM users to send e-mail on your behalf” is needed for those that generate emails and change the from field to use your account.  

      The setting “Allow E-mail Router to use my credentials to send and receive e-mail on my behalf” is required when the Outgoing profile within the Email Router Configuration Manager is set to User Specified for Access Credentials.
  2. Sending: Sending means the Email Router is currently processing the message.  It has already accepted it from CRM and is currently waiting for the Outgoing service to accept the message.  A failure here would send the email back into a Pending Send status and then Delivery Attempts would have been incremented.  If the issue is occurring at this step, then you are going to need to use some additional tools suggested below in the “Outgoing Protocols” section.
  3. Sent: This means that the Outgoing service has accepted the email for delivery and now it is up to the Email service to get the email to the To and CC addresses. 

Outgoing Protocols

We also need to understand the protocols being used for the Outgoing profile.  Each scenario dictates different types of tools and troubleshooting:

SMTP:

The main troubleshooting tool we will use for troubleshooting SMTP issues is some sort of network sniffer such as Microsoft Network Monitor (NetMon) or WireShark.  Being the company man that I am, let’s take a look at what NetMon will show us. 

 

By adding a Filter of “ProtocolName == “SMTP”, I can easily see all of the SMTP traffic.  Now the error the
problem email is the following:

 

Looking through the traffic, I can see that the Exchange server, for “some reason” is throwing Reset packets:

 

By looking at the NetMon traffic, I knew the issue was coming from the Exchange server and there must be some sort of configuration problem on that particular server.  If the issue was intermittent, maybe it was one of the servers in the environment having problems.  After doing further troubleshooting, it was found that, the firewall on the Exchange server was blocking the traffic from the CRM server. 

Exchange Online:

Exchange Online is using Exchange Web Services (EWS) to send emails.  In this case, we can use Fiddler to see what the response coming back to CRM is.

Additionally, we can use a tool called EWSEditor found on CodePlex.  EWSEditor allows us to emulate the same requests as what is being done by the Email Router.  In the screenshot above, you can see that CRM is making an EWS call to GetFolder.  You’ll notice that the Email Router is going to use the schema version for Exchange 2007 SP1, just a tip when using EWS Editor.  We’ll get into the actual usage in a tools post here.

The next part of this post is to cover Troubleshooting Incoming email issues.