I thought I’d put together a few reasons why you, the Dynamics CRM developer, should be attending my Extending Dynamics CRM 2013 workshop on July 21st.

 

Reason #1: Hands-on Instruction

Can you type?  Good; because you’ll be doing a lot of exercises.

While I like to hear the sound of my own voice, nothing beats practical practice and all of my courses have lots and lots of labs.

 

Reason #2: The Goodies

My main job is Dynamics CRM architecture and development. I have lots of tools that help me do my job and I share some of those with my development students.

Mostly they are code samples and frameworks to help you become more productive as a Dynamics CRM developer.

 

Reason #3: What Other People Have To Say

Don’t take my word for it, here are what some former students had to say about the workshops they attended:

Mitch’s Plug-in Development workshop helped me get out of the gate and a good way down the path of C# development for Microsoft Dynamics CRM – including both Plug-ins and Workflow Assemblies.

Mitch is an excellent instructor who responds to all questions and helps people along at their own pace. 

I highly recommend this workshop for anyone who is looking to get into the Microsoft CRM development game. It will accelerate your process and save you more than enough time to pay for itself.

Aron F.

Your class was an eye opening experience.  In addition to learning about Plug-In Development this class exposed me to so many other aspects of Microsoft Dynamics CRM that I was not aware of.

Marlon R. Joseph

Application Analyst III

Houston Baptist University

I found Mitch Milam’s workshop to be a great way to jump-start my plug-in development.  Besides presenting class material in such a way that it was easy to comprehend, Mitch also provided Visual Studio templates.  These templates proved to be extremely useful because they take care of the necessary plumbing when writing plug-ins, speeding up the development time.  Additionally, the labs we worked on in class covered real-life scenarios directly applicable to my day-to-day work.  In fact soon after the workshop, I solved a business problem by building a plug-in that was based on one of the labs we worked on in class.

Natalya Pinsker

Baltimore, MD,

 

Reason #4: There Are Only 15 Student Openings

As I mentioned, this is all hands-on so I have to put a limit to the number of students that can be part of the class.  15 people is at the upper limit of my typical classroom size, but since Microsoft doesn’t offer this course as Instructor-led, I want to make sure I can get as many people trained as possible.

 

Reason #5: A Bonus. Maybe.

I have a Dynamics CRM Architecture course under development and if I get enough students in the Extending course, I might just give you a free preview the week of July 28th.

 

So, what are you waiting for?

Sign up today. Review the original announcement for more information and a link to the registration page:

http://www.infinite-x.net/2014/07/01/extending-dynamics-crm-2013-workshop

And drop me a line if you have any questions:

mitch at xrmcoaches dot com

Hi Everyone,

Since I think a lot of people never get around to searching the archives, I thought I’d mention a project I started a while ago to aid the .NET developer in moving your code to the Dynamics CRM 201x version.

The project may be found here:

https://crmdotnetmigrator.codeplex.com/

Project Description
This project is designed to assist the .NET developer who is migrating their C# code from the CRM 4.0 object model to the CRM 2011 object model.

The initial purpose of the project is to generate Visual Studio macros which perform search and replace operations to which change the code from one syntax to the other.

It is planned that in a later stage of the project, we will read and covert source files directly.

 

This project contains all of the knowledge I accumulated during a couple of CRM 4.0 migrations I performed.

If you have some time, take a look.  If you have some knowledge to share and wish to make additions, then please let me know.

Thanks, Mitch

I still occasionally run into hidden greatness inside of the Dynamics CRM SDK.  Last week I found a great addition to the QueryExpression and QueryByAttribute classes: The TopCount property.

This property was introduced into Dynamics CRM 2011 around the UR10-UR11 timeframe, so if you are on UR11, or later, or have Dynamics CRM 2013, you have this capability.

TopCount works exactly like the TOP operator from a SQL SELECT statement:

SELECT TOP 50 * FROM FilteredAccount

 

Here is how you use it:

Note: I have a small function called IsTopCountSupportedByServer that checks the version number against UR11 to make sure we can use TopCount.  If not, we drop back to the standard PagingInfo class.

var maxBatchSize = 50;

QueryExpression queryExpression = new QueryExpression(Account.EntityLogicalName);

if (IsTopCountSupportedByServer())
{
    queryExpression.TopCount = new int?(maxBatchSize);
}
else
{
    queryExpression.PageInfo.Count = maxBatchSize;
    queryExpression.PageInfo.PageNumber = 1;
}

This is just a really cool addition to our toolboxes and I am shocked I didn’t see this before.

Hi Folks,

In preparation of my JavaScript workshop next week, I usually hold a one-hour Introduction to JavaScript webinar that gives students a brief introduction to what JavaScript is and how it works.

I am opening up registration for that webinar to everyone, should you have interest in attending.

And I apologize the for the short notice. It really just occurred to me.

As part of this webinar, you’ll receive a self-paced study guide that you complete on your own time.  It contains some simple exercises that show you how to do JavaScript tasks such as math functions, conditional logic operators, etc.

This webinar will not exactly make you a JavaScript expert, but it show you the basics of JavaScript.

Registration information is below:

 

Introduction to JavaScript

 

Join us for a Webinar on April 25

 

 

Space is limited.
Reserve your Webinar seat now at:
https://www4.gotomeeting.com/register/732347127

 

This is an introduction to JavaScript for Dynamics CRM users who would like to start using JavaScript but do not know where to start.

Title:

Introduction to JavaScript

Date:

Friday, April 25, 2014

Time:

1:30 PM – 2:30 PM CDT

After registering you will receive a confirmation email containing information about joining the Webinar.

System Requirements
PC-based attendees
Required: Windows® 8, 7, Vista, XP or 2003 Server

 

Mac®-based attendees
Required: Mac OS® X 10.6 or newer

 

Mobile attendees
Required: iPhone®, iPad®, Android™ phone or Android tablet

 

Hi Everyone,

Registration closes tonight for next week's Dynamics CRM JavaScript Development workshop.

Eventbrite - JavaScript Development with Dynamics CRM (April)

When:

Monday, April 28th through Thursday, May 1st. 1:00pm-5:00pm each day.

Where:

Online using GoTo Meeting.

What:

This is a hands-on workshop utilizing Dynamics CRM Online.

Cost:

$895 per person (multi-student discounts available)

Note: Due to the interactive nature of this workshop, it will be limited to 10 students.

Student Prerequisite Knowledge:

  • Each student must have working knowledge of Dynamics CRM 2011.
  • Knowledge of JavaScript is also required.

Note: For those students that have not worked with JavaScript previously, a short introduction webinar will be conducted on Friday, April 25th. Students attending this webinar will be expected to have completed the accompanying self-study materials before Monday's class begins. Everyone must be ready to run on Monday for the main class.

Agenda:

Each classroom day will run from 1:00pm to 5:00pm (CST) with the virtual environments available for student use until midnight of May 1st.

And thanks to our virtual development environments, the majority of our time will be spent actually developing JavaScript solutions for Dynamics CRM.

Think labs. Lots and lots of labs. And homework. There will be homework.

We'll cover the following topics:

  • Creating a development environment
    • Setup
    • Source control
    • Working in teams
    • Working with Visual Studio
  • Working with Web Resources
  • Working with Solutions
  • Working with Forms
    • JavaScript libraries
    • Form events
    • Form Event Handler Execution Context Reference
  • Working with the Xrm.Page Object Model
    • Working with Collections
    • Data operations
    • Tabs and Sections
    • Working with Controls
    • Working with iFrames
    • Working with Navigation Items
  • Ribbon button and JavaScript connection
  • Opening Dynamics CRM Forms and Web Resources via JavaScript
  • Using the XrmSrcToolkit to CRM-related data operations

We will be using about 75 of the methods found in the Xrm.Page object model so you should leave class with a fairly good understanding of where things are and how to access them.

If we have time, we will also cover some of the freely available JavaScript components that can be used to aid in your development efforts and to increase your user's productivity.

Students will also receive a draft copy of my upcoming book on Dynamics CRM JavaScript development along with sample code and utility web resources that should help you kick start your CRM JavaScript development efforts.

Eventbrite - JavaScript Development with Dynamics CRM (April)

 

Thanks, Mitch

In case you have ever wondered or needed to know, here is how you get the ID of the current user using .NET (C# in this case):

var whoAmIResponse = (WhoAmIResponse)OrganizationService.Execute(new WhoAmIRequest());

var currentUser = new EntityReference(SystemUser.EntityLogicalName, whoAmIResponse.UserId);

Hi Everyone,

Registration closes for the Plug-in Development Workshop on Thursday so now is the time to register.

Eventbrite - Plug-in Development with Dynamics CRM (April)

 

Here are what some of my former students have to say:

I found Mitch Milam’s workshop to be a great way to jump-start my plug-in development. Besides presenting class material in such a way that it was easy to comprehend, Mitch also provided Visual Studio templates. These templates proved to be extremely useful because they take care of the necessary plumbing when writing plug-ins, speeding up the development time. Additionally, the labs we worked on in class covered real-life scenarios directly applicable to my day-to-day work. In fact soon after the workshop, I solved a business problem by building a plug-in that was based on one of the labs we worked on in class.

Natalya Pinsker, Baltimore, MD

   

Mitch’s Plug-in Development workshop helped me get out of the gate and a good way down the path of C# development for Microsoft Dynamics CRM – including both Plug-ins and Workflow Assemblies. Mitch is an excellent instructor who responds to all questions and helps people along at their own pace. I highly recommend this workshop for anyone who is looking to get into the Microsoft CRM development game. It will accelerate your process and save you more than enough time to pay for itself.

Aron F.

   

Your class was an eye opening experience. In addition to learning about Plug-In Development this class exposed me to so many other aspects of Microsoft Dynamics CRM that I was not aware of.

Marlon R. Joseph, Application Analyst III, Houston Baptist University

 

You may get more details about this workshop here.

Thanks, Mitch

I am holding another Dynamics CRM Plugin Development workshop this month. The goal of the class is for me to teach you everything I know about plugin development.

When: Monday, April 21st through Thursday, April 24th. 1:00pm – 5:00pm CST each day.

Where: Online

What: This is a hands-on workshop with each student provided their own virtual development environment for the duration of the class

Cost: $895 per person (multi-student discounts available)

Note: Due to the interactive nature of this workshop, it will be limited to 10 students.

Eventbrite - Plug-in Development with Dynamics CRM (April)

Note: Registration closes at 10:00pm CDT.

Agenda:

  • Plugin architecture and design
    • The Dynamics CRM execution pipeline
    • The how, why, and where of plugging into Dynamics CRM
    • Performance considerations
    • Working in the sandbox
  • The development environment
    • Setup
    • Source control
    • Working in teams
  • Deploying plugins
    • To CRM
    • In a solution
    • To CRM Online (if applicable to the student population)
  • Debugging plugins
    • Synchronous vs. asynchronous
    • Full-trust vs. sandboxed
  • Custom activity architecture
  • Design features
  • Deployment
  • Asynchronous process monitoring
  • System job cleanup and maintenance
  • Open-lab time
  • Upgrade scenarios
  • Code-recovery of lost source plugin code

Thanks to our virtual development environments, the majority of our time will be spent actually designing and developing real-world plugins. Think labs. Lots and lots of labs. In fact, here is the list:

Plug-In Exercises:

  • Exercise 1: Autonumber – DateTime
  • Exercise 2: Autonumber – QueryExpression
  • Exercise 3: Autonumber – SQL
  • Exercise 4: Create Related Records
  • Exercise 5: Generate a Formal Name
  • Exercise 6: Handling Exceptions
  • Exercise 7: Multi-Entity Plugin
  • Exercise 8: Monitoring Plug-In Depth
  • Exercise 9: Auto-Assign Records
  • Exercise 10: Zip Code Lookup
  • Exercise 11: Child Record Rollup
  • Exercise 12: Data Validation
  • Exercise 13: Audit Log

Custom Workflow Activity Exercises:

  • Exercise 1: Route a New Lead
  • Exercise 2: Verify Email

In addition to the workshop materials, each student will receive additional tools and code templates to help increase their productivity as a Dynamics CRM plug-in developer.

Finally, all students are free to keep any work produced during their lab-time as well as the tools and templates used in class.

Every now and then I run into an issue that I should have already known about.  Either that, or I knew about it and later forgot.  Regardless, let me tell you the story of the plug-in and the missing data.

 

Background

Let us say that I have a plug-in that is registered on the Create message for the Account entity. When a new Account is created, it will automatically populate a custom field with the name of the Primary Contact using code that looks like this:

var primaryContact = entity.GetAttributeValue<EntityReference>("primarycontactid");

entity["new_primarycontactname"] = 
    string.Format("{0}-{1:d}", primaryContact.Name, DateTime.Now);

This is pretty simple CRM SDK work that most of us do on a daily basis without much thought whatsoever.  All I am doing is taking the display name from the Entity Reference and using that value, along with the current date, to populate my custom field.

When the record is created with the CRM user interface, this code works perfectly. But, and there is always a but, what if we create the Account using an SDK call?

The answer is: It does not work so perfectly.

When you are creating an Entity record using the SDK the common method for creating an Entity Reference is to use code like this:

entity["primarycontactid"] = new EntityReference(Contact.EntityLogicalName, 
                                      Guid("9C06869F-50C6-E211-8D6B-00155D1E5005"));

This is the minimum requirement for populating an Entity Reference (Lookup) field using the SDK, and is generally how everyone does it.

 

The Problem

The problem is our plug-in.  Since the plug-in is registered on the Create message, it will fire for each Account being created, no matter if the record is coming from the Dynamics CRM web client, from a Scribe or SSIS job, or in this case, from a customer-facing web portal.

Since we did not specify the .Name property on our primarycontactid field, it will arrive inside of the plug-in as a Null value.

This means my plugin code will produce: "-4/8/2014” instead of “John Smith-4/8/2014.

This is not a bug in CRM, this is just the way it works.

 

The Work Around

So if we indeed need the .Name property on the Entity Reference, we need to either specify it in our code, like this:

var primaryContact = new EntityReference(
                              Contact.EntityLogicalName, 
                              new Guid("9C06869F-50C6-E211-8D6B-00155D1E5005"));
primaryContact.Name = "John Smith";

entity["primarycontactid"] = primaryContact;

OR, and this is not exactly a good thing, perform a read, from within the plug-in, of the Entity record referenced and pull back the primary field, like this:

var contact = organizationService.Retrieve(
                 patientReference.LogicalName, 
                 patientReference.Id, 
                 new ColumnSet(new[] { "fullname" }));

return patient["fullname"].ToString();

Anyway, this is something to keep in mind should you have an applications integrated with your Dynamics CRM system.

Hi Everyone,

Next month I will be holding two workshops for CRM developers:

 

Plug-in Development with Dynamics CRM

Monday, April 21th through Thursday, April 24th. 1:00pm-5:00pm each day.

 

JavaScript Development with Dynamics CRM

Monday, April 28th through Thursday, May 1st. 1:00pm-5:00pm each day.

 

Pricing

Pricing will be $895 per student, per workshop, with multiple-student and multiple-workshop discounts available.

Due to the interactive nature of the workshop, there is a limit of 10 students per workshop.

 

Registration

Registration will open on Thursday, April 3rd.

To pre-register and secure your seat now, enter your information on the April Workshops sign-up page.

Sign up for our new KnowledgeBits service and get news, tips and tricks and more, delivered straight to your inbox.