CRM MVP Question and Answer – Demian Adolfo Raschkovan

Today we say Hola because this weeks CRM MVP is currently residing in Spain (although he is from Argentinian stock).

He supports an average football team Getafe (although they are better than Ipswich as most teams are) who are hovering above the relegation zone, so it will be a nervous weekend for Demian coming up.

Not only has Demian won to MCC awards (you get this for answering lots of forum questions), an MVP, he is also a MAP  (Microsoft Active Professional) 2014.   This is a local distinction in Spain, which rewards partners communities in Spain and other countries.

He also deserves respect because he used CRM version 1.2, which I believe was a notebook with a calculator sellotaped on to it.  CRM 1.2 is also known as evil CRM, which instead of helping you with CRM did everything it could to stop you 🙂

 

Here is Demian’s CRM MVP Biography

Microsoft Community Contributor (MCC) awarded in october 2012 and january 2013

Technical consultant with extensive experience in Microsoft Dynamics CRM and Microsoft technologies. 
I am currently working at Development and Technical Solutions Architect for Infoavan Soluciones, a Microsoft Dynamics CRM Gold Certified partner in Madrid, Spain.
I worked in more than 60 CRM implementations in different positions (as developer, project leader, etc) and different areas (banking, construction, telecommunications, engineers, services, etc.). I also worked in some international projects.
I am passionate about CRM and all the possibilities that Microsoft Dynamics delivers, and I have a CRM blog (in Spanish). I also collaborate in other blogs and forums in Spanish:http://www.elblogdedynamicscrm.com/ and http://social.microsoft.com/Forums/es-ES/crmspanish/threads (Microsoft Spanish CRM Forum).

Here are some Rockstar highlights

demian rockstar 1

 

demian rockstar 2

 

demian rockstar 3

Thanks for Demian for answering my questions, greatly appreciated

If you want to read previous CRM MVP Q&A by clicking the link on the header – HOSK’S CRM MVP Q&A

 

QUESTIONS

Name, current job title and social media links please
Demian Adolfo Raschkovan
Dynamics CRM Technical Specialist, Infoavan Soluciones
Blog: www.demianrasko.com
Twitter: @demian_rasko
Email: mvp@demianrasko.com

What does an average day at work look like
Prepare my children to school
Walking to work (4 minutes)
Working with CRM all day
Breakfast at 10:00 (at work)
Lunch at home
Every day I find a new cool stuff around Dynamics CRM and Microsoft stack and I think to implement in my next project, the problem is that I don’t start a new project every day, so I have to wait to finish the actual ones, to use this new cool stuff. If I cannot use it, I blog it to test and learn it.
When I finish, I get back to home, sleep my children and start blogging, tweeting and online training.

What different roles/Job titles have you had whilst using CRM
Developer, Developer, Developer
Project manager
Trainer
Solution Architect
Presales

What job did you did before you starting using CRM
Developer in 3d Games, and with ASP.NET/SQL Server web sites and Windows forms solutions.

What was the first version of Microsoft Dynamics CRM you worked with and how long have you been using Microsoft Dynamics CRM
I started with the 1.2 version (more than 8 years ago).

How do you stay up to date with the CRM
Tweeting, Bloging and participating in online communities like MSDN and Dynamics forums / ComunidadCRM.com Spanish community.
I also try to learn the lasts developing technologies.

How do you find time to contribute to the CRM community whilst doing your job
I just have time when my children are sleeping, so I need to take them to bed, and then I start my “Community” life.

What advice would you give to someone who wants to have a successful career in Microsoft Dynamics CRM?
Learn and share your knowledge. When you share knowledge, you also learn and grow as a professional. Always say the truth to all the customers, be open and try to explain everything to customers helps you to finish your projects successfully.

What where your first impressions of CRM 2013 and what do you think now.
I started with the 1.2 version, and if see the solution today, It’s just awesome! I think Microsoft made not only have the best CRM solution in the market, it’s also the one who makes the best changes in the solution. If I see to the future, I think Dynamics CRM will take advantage of other competitors. The big changes in CRM 2013 are in the User Interface, and I think it’s more clean, fast and nice.

What one feature would you add to CRM 2013
Inline editing in all the subgrids, like in Qoutes.

Most annoying feature of CRM 2013
Why I cannot add security roles to field level security profiles?

You favourite 2 CRM blogs (I have filled the first one in for you)

            1.  Hosks Dynamic CRM blog
            2. http://mscrmtools.blogspot.com.es/ (Tanguy CRM Blog) – Best Tools for CRM
3. http://www.stunnware.com/ (this is an old one, not active right now)

What year will Microsoft Dynamics CRM have more customers than Sales force
I’m not following the numbers but my background is Technical and I think Microsoft is winning in this part.

Are you doing more CRM projects with CRM online?  Do you think it will all be online in the future
Right now, my customers select more OnPremise, but there is a movement to change this wave, and more and more customers want to go to the cloud. I think that the online option will increase, but the Onpremise implementations will stay there for a long time for some kind of customers.

What is the best tool/solution you have used recently
XrmToolbox and RibbonWorkbench, kingswaysoft, and XrmServiceToolkit

What CRM certifications do you have, do you try and keep up to date with CRM certifications
CRM 3.0, CRM 4.0, Dynamics CRM 2011 and 2013. I also passed Sure Step exams and presales assessment. I want to take this year the application and installation ones (in 2013 I have only the customization exam)

How important is it to have good business analytical skills working with Microsoft Dynamics CRM.
It’s important to have profiles in the projects that have technical skills, but more important is to have someone that understand the customer needs, so you can focus your technical solution to that requirements. Sometimes the best technical solutions, doesn’t fits with customer needs, so the project fails.

How useful is it to have programming knowledge to become a good Microsoft Dynamics CRM Professional?
It’s important but it is not required at all. It is very useful because in almost all the CRM projects you need some kind of development, but you can be an excellent CRM professional with no programming knowledge at all.

What knowledge/experience do you have with software/systems which integrate with Microsoft Dynamics CRM e.g. (sharepoint, SQL Server, Scribe, Etc)
Each project is different, but almost all the project needs some integration. Depending on the volume, the time gap and the systems to integrate, I used a lot of different solutions. From custom development (mostly used) to kingswaysoft, online integration with web services, Dynamics Connector, etc.

How often do you travel as a Microsoft Dynamics CRM Professional?
More or less twice a month.

Can you see yourself not using CRM in your career in the future
No way!

What is favourite part of being a CRM MVP
MVP Summit!

What are your hobbies outside of CRM
Running, Tennis, watch Football and travel

 What was the last book you read and what was the last film you watched
Toy Story and Toy Story, my daughter….

Has CRM ever got you in trouble with your partner/family.
Every night…when I turns on my PC at home…

Have you friends ever told you to stop talking/tweeting/blogging about CRM? What does your partner/family member(s) think of CRM
Yes, sometimes, but I really love it and if I find anybody with interest to talk about technology, I cannot stop. My 3 years old daughter already “played” with moca in her Surface 2 tablet.

Tell me something interesting/unusual about yourself
I was born in Buenos Aires, Argentina, and I lived in Madrid, Spain for the last 12 years. I really love football and I go every Sunday to the Stadium to watch my favorite team (Getafe).

Who is the first CRM MVP you remember reading/seeing
Marco Amoedo (now in Microsoft UK)

Tips for someone who wants to become a CRM MVP
Just start sharing knowledge, and collaborate with others. One important thing is to do it for a long time, with no stop, at the end Microsoft recognize people who really want to help others.

Quickfire questions (choose one option and no explanation)

Steve Jobs or Bill Gates
BILL GATES

Javascript or .NET
Javascript

Internet Explorer/Chrome/Firefox/Safari
Chrome

Wine/Beer/Soft Drink
Beer

Certifications or Use CRM
Use CRM

twerking or tweeting
Tweeting

books or ebooks
Ebooks

save or autosave
Save (I’m from the old school)

OnLine or On Premise
OnPrem
Windows 7/Windows 8/Linux/Mac/Other
Windows 8.1
work from home or work from office
From office

Miley Cyrus or Billy Ray Cyrus
….

Vinyl/CD’s/MP3’s/Subscribe
Youtube?

Zero Inbox/Overflowing Inbox
Overflowing inbox

Early Bird/Night Owl
Early Bird

Do Today/Do Tomorrow
Do Today

CRM Developer/CRM Consultant
CRM Developer

Hot Weather/Cold Weather
Hot Weather

Half Full/Half Empty
Half Full

CRM 2013 Tool – CRM Early Bound Generator

Tanguy CRM MVP creator of the excellent XrmToolbox has let the framework of the XrmToolbox the tool CRM Early Bound Generator and this is very kind and extremely useful.

here is the video review, which runs through using the file in your plugin code in visual studio.

Lets start with the basics, the tool is free and you can find the tool on codeplex

https://xrmearlyboundgenerator.codeplex.com/

The CRM Early Bound generator is basically a way to make it easier to create Early bound entities and it does this by creating an application wrapped around the CrmSvcUtil.exe.

To find out more about the CrmSvcUtil.exe click the link below

http://msdn.microsoft.com/en-us/library/gg327844.aspx

I have blogged about using the crmsvcutil in a couple of blogs

CRM 2011 – How to add crmsvcutil to the External tools menu in Visual Studio

CRM 2011 – Simple CrmSvcUtil example for creating early bound classes

So it was with some interest I cracked open this tool and the first thing you notice is the initial container is the XrmToolBox

You then have to add a connection and then you will get this page.  If you have already setup the XrmToolbox you can copy the mscrmtools2011 and it will bring the connections you have already made to this tool.

Now although you can do this Early bound generator stuff with the CRM Developer toolkit he hulk2484 (excellent name), here is a picture of him

here is a picture of the tool main page

So from here you can now see you have quite a lot of options to create the early bound class.  I would mention that the codeplex page has a detailed description of all the options and this tool is one of the best documentation tools I have seen, so well done with that aspect of the tool (especially consider developers had documenting things)

I noticed that clicking

Create One File Per Entity

Generates an error

Entity Path must be a directory

I guess this is a bug or maybe something I’m not changing but I’m not sure you would go for all this effort to split the files into separate files

The things I liked about the tool was this option

Entities To Skip

This will allow you to select entities to not generate CRM early bound files for, this is very useful in keeping the size of the file down and the time it takes to generate (which although small, you will have to do this lots of times).  Also it remembers which records you have chosen to exlude.

Another good feature is it can create enum mappings for optionsets which makes it easier and safer to use these.

The tool is very good and easy to use. good job.

CRM 2013/2011 – Regex for JavaScript mobile phone validation

validating phone numbers is not a straight forward problem. One of the basic checks is to make sure it’s a certain length. Probably one of the hardest jobs is to work out exactly what your rules are for validation.

I think the best way to tackle this is use a JavaScript function and in that function you can do a number of checks

before I checked the validation of the number I would remove dashes and brackets and just concentrate on validating the number.

You could then validate the first part of the phone and check it’s an international code. If it wasn’t an international code then you could check it was a valid mobile

I would then use regular expression to check it was the a certain length

Sample code


function checkUKTelephone(telephoneNumber) {
/// <summary>
/// validates a uk mobile phone number
/// </summary>
// Convert into a string and check that we were provided with something
var telnum = telephoneNumber + " ";
if (telnum.length == 1) {
telNumberErrorNo = 1;
return false
}
telnum.length = telnum.length - 1;

// Remove spaces from the telephone number to help validation
while (telnum.indexOf(" ") != -1) {
telnum = telnum.slice(0, telnum.indexOf(" ")) + telnum.slice(telnum.indexOf(" ") + 1)
}

// Remove hyphens from the telephone number to help validation
while (telnum.indexOf("-") != -1) {
telnum = telnum.slice(0, telnum.indexOf("-")) + telnum.slice(telnum.indexOf("-") + 1)
}

// Remove hyphens from the telephone number to help validation
while (telnum.indexOf(")") != -1) {
telnum = telnum.slice(0, telnum.indexOf(")")) + telnum.slice(telnum.indexOf(")") + 1)
}

while (telnum.indexOf("(") != -1) {
telnum = telnum.slice(0, telnum.indexOf("(")) + telnum.slice(telnum.indexOf("(") + 1)
}

while (telnum.indexOf("+") != -1) {
telnum = telnum.slice(0, telnum.indexOf("+")) + telnum.slice(telnum.indexOf("+") + 1)
}

if (telnum.indexOf("44") == 0){
telnum = telnum.replace("44", "0");
}

var exp = /(070|071|072|073|074|075|076|077|078|079)\d{7,8}$/;
// Finally check that the telephone number is appropriate.
// exp = /(44|070|071|072|073|074|075|076|077|078|079)\d{7,8}$/;
if (exp != null) {
//if the regular expression is wrong I don't want to show the user, we can use F12 to debug
try {
if (exp.test(telnum) != true) {
telNumberErrorNo = 5;
return false;
}
}
catch (err) { }
}

// Telephone number seems to be valid - return the stripped telehone number
return telnum;
}

Hosk’s Top CRM 2013 articles of the week 9th May 2014

I had two interactions with readers of my blog this week

one person was criticizing a blog post written in December 2011, saying the title wasn’t very good and I should include some pictures.  This was fair enough and I’m all for constructive criticism and the blog post did look a bit boring but it did also resolve his problem.  The blog post is how to add code in WordPress blogs

https://crmbusiness.wordpress.com/2011/12/15/how-to-highlight-code-in-hosted-wordpress-blogs/

Then the person went to far and said I should change the title of the blog because Hosk’s Dynamic CRM Blog was boring.  Woah there tiger, step back and leave the Hosk name alone there big boy.

The second interaction was more positive, he said he liked the weekly round up because he didn’t have enough time to keep up with all the blogs being written.  This highlights the reason I Hosk’s weekly picks.

I want to list the really good/useful articles I read in the week.   I only want to list the good ones, so some weeks it’s a big list and other weeks there is a small list.

 

If you come across any good blog post please email me or or tweet the link and mention and add my twitter account @BenHosk, thanks to Bartłomiej Steidel for recommending a couple of good CRM blogs this week.

I wasn’t really sure people liked the my weekly round up but it seems people do enjoy me scurrying around collecting great CRM articles for them to read on a Friday.
Lets bring some postivity into this weekly round up, thumbs up people

Article of the week

This is a great blog post about Auto Save, it shows you how it works and ways to interact, turn it off and a few gotcha’s.  This article seems to collate many articles I have read on auto saving into one handy blog post.

All you want to know about Auto Save

 

It’s a bumper crop this week

The Best of the Rest

Service pack 1 is choc full of fixes

Microsoft Dynamics CRM 2013 Service Pack 1 (SP1) will be available in the second quarter (Q2) of 2014

 

Microsoft Support give us a sneaky trick to make fields appear in the bulk edit window, very useful

Dynamics CRM Parent Account lookup field is greyish in bulk edit

 

working out what sql querys are generated from your CRM FetchXML queries

Use SQL Tracing to find the SQL query generated for Dynamics CRM Platform Operations for CRM On-Premise

 

Microsoft have finally made CRM 2011 compatible with Windows 8 and IE11

CRM 2011 – Rollup 17 – IE11 is now compatible with CRM 2011

 

This is a question that pops up regularly on the CRM forum, so it’s good to have an answer to it.  It’s also not something I do very often, so it’s good to have a step by step guide.

How to Import Marketing List Members in Microsoft Dynamics CRM

 

if you have ever raised a support call, you will have had to run the support diagnostic tool, this article explains why

Support Diagnostics Tools

 

A good article from Robert Peledie, he has been on good form on the last few weeks, so keep up the good work Mr P.  This article shows you how you can override the created on date, this can be very useful thing to know

Override The Created On Date on Import

 

The marvelous Dave Berry is in the firing line and rises to the challenge like an Eagle on Red Bull

CRM MVP Question and Answer – Dave Berry

 

Every time I create a new entity, I stop for a few minutes to debate the question, should this entity be user owned or organisational.  Knowing that once you press the button you can’t go back and change it, ramps up the pressure.  So let this article guide you on that subject.

User-Owned or Organization-Owned Entities?

A blog post by the Hosk, going through creating a plugin which is triggered after a new account is created, we created a follow up task.  It’s simple, it will only take you twenty minutes.

CRM 2013 Plugin – Step by Step guide for a Post Account Create Plugin using the Developer Toolkit

 

I wasn’t sure about Access Teams, I understood you create them to give quick and ad hoc access to a record but never really understood why I would do that and for what scenario but as I read more articles on the subject I am slowly seeing the benefits e.g. access teams don’t use the POV table!  Good article, I will also be going through this soon for my MB2-703 – CRM 2013 customization and configuration studying.

Microsoft Dynamics CRM Owner Teams vs Access Teams

Did you know that if you own a workflow and disable your user the workflow will refuse to work, well you do now.

Workflow ownership and disabled users

Hosk goes through the process of creating a dialog and don’t be fooled by the title, dialog’s are not easy they are odd, like an upside down workflow

CRM 2013 – Simple Dialog with a CRM Query

cheeky little trick on how to set a bookmark in IE which pops up an alert of the record you are on.

Retrieving a Record’s GUID in Microsoft Dynamics CRM 2013

Article from CRM MVP Scott Durow the creator of the mighty Ribbon Workbench.  This article shows you how to create a command bar button if you create a new entity and you tick the activity checkbox.  This article is useful just to show you how to use the Ribbon Workbench which can take a little bit of time to get used to (because there are so many options)

Create a command bar button for your custom activities

A dev tip, also add Id to lookup fields in CRM.  Everyone else is doing it and so should you.

Hosk CRM Dev Tip – add ID suffix to lookup fields

You may have heard me waffle on about Badges before but you could be collecting lots of badges to boast to your CRM buddies about.  Microsoft could tweeting about your new level upgrade.  There are also some good screens hidden away to show your ranking on answering forum questions

What are Microsoft Dynamics Community Badges and how to get started collecting them

Creating a no code approval process in CRM 2013 using lots of new CRM 2013 functionality

http://benitezhere.blogspot.co.uk/2014/05/a-simple-approval-process-in-crm-2013.html

Tools

A useful tool for showing pins on bing maps
Dynamics CRM Bing Map custom Chart

 

This is a very cool tool by kingswaysoft,  it will convert SQL statements into FetchXML. WOW

http://www.sql2fetchxml.com/

 

videos

a video for those studying for the MB2-703 – CRM 2013 Customization and configuration exam
CRM 2013 – MB2 703 – Manage user access, Teams and sharing

 

learn some more about access teams

Microsoft Dynamics CRM 2013 Application New Features – Access Teams

 

If you want more great articles, why not go back and read last weeks top CRM articles again, did you read them?

https://crmbusiness.wordpress.com/2014/05/02/hosks-top-crm-2013-articles-of-the-week-2nd-may-2014/

 

if you find reading to difficult today, why not go and watch some CRM videos on my youtube channel

Hosk’s CRM Dev

CRM 2011 – Rollup 17 is Released – CRM 2011 is now compatible with Windows 8.1 and IE11

a new rollup for CRM 2011 has been rolled out today and now before you all go rushing off to install it.  I would remind you best practices regarding rollups is to stay one rollup behind, this is to help ensure you don’t install a rollup for then someone to find a great big bug in it.

Unless there is a fix you need urgently of course.

It’s good to see CRM 2011 is now compatible with IE 11

First things first here is the download link

http://www.microsoft.com/en-us/download/details.aspx?id=42672

Microsoft add an Important Note which you can see on the kb article – http://support.microsoft.com/kb/2915687

important Note: Microsoft Dynamics CRM 2011 Update Rollup 17 is compatible with Windows 8.1 or Windows 7 and Internet Explorer 11. This includes the following supported configurations.

  • The web application running in Internet Explorer 11 on Windows 8.1 or Windows 7.
  • CRM for Outlook when you run Office 2013 on Windows 8.1.

I would also note there is a hotfix which needs a bit of manual wangling, text taken from KB article

Hotfixes and updates that you must enable or configure manually

Update Rollup 17 for Microsoft Dynamics CRM contains one fix that must be enabled manually.

  • When you attempt to deploy a mailbox rule using the forward mailbox rule deployment wizard, with a split deployment for Exchange 2010 where your mailbox servers are not client access servers, you receive an error: Failed to access the default store for the user.
    1. On the Email Router machine, you must create a new String value Key named “CASServerName” in the path HKEY_Local_Machine\Software\Microsoft\MSCRMEmail.
    2. Enter the NetBIOS name of one of the Exchange CAS servers.

 

There is a lot of fixes in this rollup, so go to the KB article to see if there is a particularly bug that is fixed.  I couldn’t see anything to get really excited about, apart from IE 11  support and maybe CRM 2011 won’t crash as often.

 

CRM 2013 Plugin – Step by Step guide for a Post Account Create Plugin using the Developer Toolkit

In the I have created a video if you want to watch me go through the process of creating the plugin. Before I start with this plugin tutorial, to understand it you will need to have gone through my previous tutorials I have three CRM videos and two blog posts

Setting up Developer Toolkit for Microsoft Dynamics CRM

blog – Setting up visual studio with the developer toolkit

video – CRM 2013 – Create a simple plugin in CRM 2013 using the CRM Development Toolkit 

blog – CRM 2013 – simple update plugin

CRM 2013 – Simple Plugin – Redeploying, improving and updating

So I will assume you have got CRM development toolkit setup and ready to rock, so now we can just focus on creating a new plugin to run on the create of an account record In this plugin we are going to create a plugin which is triggered when a new account is created.

Here is a video going through the steps

below features the steps and the code

The plugin will fire after the new account is created so it will be a post plugin message.

The plugin will then create a follow up task with a due date in two weeks time.

Open up your Visual Studio project.

Go to the CRM Explorer

click on Account right click and choose Create Plug-in

Create Account Plugin

 

For the Create Plugin Details, Account is already set but you want to

change Message to Create

Pipeline stage to Post-Operation

Create Account Plugin 1

 

This will Create a file called PostAccountCreate.cs  For this plugin I have split up the default plugin code and the code which does the creating of the task.

 

// <copyright file="PostAccountCreate.cs" company="Microsoft">
// Copyright (c) 2014 All Rights Reserved
// </copyright>
// <author>Microsoft</author>
// <date>4/26/2014 10:42:26 PM</date>
// <summary>Implements the PostAccountCreate Plugin.</summary>
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
// </auto-generated>
namespace HoskCRMDev2013.Plugins
{
 using System;
 using System.ServiceModel;
 using HoskCRMDev2013.Plugins.Plugin_Code;
 using Microsoft.Xrm.Sdk;

 /// <summary>
 /// PostAccountCreate Plugin.
 /// </summary>
 public class PostAccountCreate: Plugin
 {
 /// <summary>
 /// Initializes a new instance of the <see cref="PostAccountCreate"/> class.
 /// </summary>
 public PostAccountCreate()
 : base(typeof(PostAccountCreate))
 {
 base.RegisteredEvents.Add(new Tuple<int, string, string, Action<LocalPluginContext>>(40, "Create", "account", new Action<LocalPluginContext>(ExecutePostAccountCreate)));

 // Note : you can register for more events here if this plugin is not specific to an individual entity and message combination.
 // You may also need to update your RegisterFile.crmregister plug-in registration file to reflect any change.
 }

 /// <summary>
 /// Executes the plug-in.
 /// </summary>
 /// <param name="localContext">The <see cref="LocalPluginContext"/> which contains the
 /// <see cref="IPluginExecutionContext"/>,
 /// <see cref="IOrganizationService"/>
 /// and <see cref="ITracingService"/>
 /// </param>
 /// <remarks>
 /// For improved performance, Microsoft Dynamics CRM caches plug-in instances.
 /// The plug-in's Execute method should be written to be stateless as the constructor
 /// is not called for every invocation of the plug-in. Also, multiple system threads
 /// could execute the plug-in at the same time. All per invocation state information
 /// is stored in the context. This means that you should not use global variables in plug-ins.
 /// </remarks>
 protected void ExecutePostAccountCreate(LocalPluginContext localContext)
 {
 if (localContext == null)
 {
 throw new ArgumentNullException("localContext");
 }

 // TODO: Implement your custom Plug-in business logic.
 // Obtain the execution context from the service provider.
 IPluginExecutionContext context = localContext.PluginExecutionContext;
 IOrganizationService service = localContext.OrganizationService;

 // The InputParameters collection contains all the data passed in the message request.
 if (context.InputParameters.Contains("Target") &&
 context.InputParameters["Target"] is Entity)
 {
 // Obtain the target entity from the input parmameters.
 Entity entity = (Entity)context.InputParameters["Target"];
 if (entity.LogicalName == "account")
 {
 if (context.MessageName.ToUpper() == "CREATE")
 {

 AccountCreateFollowUp accountCreateFollowUp = new AccountCreateFollowUp();
 accountCreateFollowUp.CreateAccountTask(service, entity);

 }
 }
 }
 }
 }
}

The code above checks to see if the entity is of type account and if the message is a CREATE message. This is in case you had the same plugin being fired on lots of different account messages (e.g. create, update, status change).  We aren’t really using it in this plugin but I thought it would be interesting to mention it.

The code which creates the task is called here

AccountCreateFollowUp accountCreateFollowUp = new AccountCreateFollowUp();
accountCreateFollowUp.CreateAccountTask(service, entity);

Below you can see the class which creates the followup task

using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xrm.Sdk;

namespace HoskCRMDev2013.Plugins.Plugin_Code
{
 public class AccountCreateFollowUp
 {
 /// <summary>
 /// Code to create account task for new accounts
 /// </summary>
 /// <param name="service">crm service</param>
 /// <param name="accountEntity">entity of the newly created account</param>
 public void CreateAccountTask(IOrganizationService service, Entity accountEntity)
 {
 try
 {

 //create new task for account set in 2 weeks in the future
 Entity contactAccountTask = new Entity("task");
 contactAccountTask["subject"] = "Check new account is happy";
 contactAccountTask["description"] =
 "Make contact with new customer. See if they are happy with service and resolve any issues.";
 contactAccountTask["scheduledstart"] = DateTime.Now.AddDays(14);
 contactAccountTask["scheduledend"] = DateTime.Now.AddDays(14);
 EntityReference entRef = new EntityReference("account", accountEntity.Id);
 contactAccountTask["regardingobjectid"] = entRef;

 // Create the task and this should be linked to the new account record
 service.Create(contactAccountTask);

 }

 catch (FaultException ex)
 {
 throw new InvalidPluginExecutionException("An error occurred in the plug-in.", ex);
 }
 }

 }

}

Now right click on CRMPackage

click build

Click Deploy

 

CRM 2013 – MB2 703 – Manage user access, Teams and sharing

In this blog post I will continue looking at the security features in CRM with regards with understanding the information for the MB2-703 – CRM 2013 Customization and configuration exam.

I will be focusing on

  • Manage access.
    • This topic may include: manage users and teams; configure sharing; manage Security Roles for users and teams; create Access Team Templates; add Access Team subgrids to forms

To see the topics in CRM 2013 then watch the video

This involves users/teams and sharing records and components and a little bit about authentication

 

Authentication

 

The security authentication in CRM is not really handled inside CRM.  A bit like the way CRM lets outlook/email router do all the emailing, CRM also gets another piece of software to do the authentication of users.

 

on premise

most commonly user records are linked to active directory

You can also used Internet facing deployment (IFD) where the authentication is either

AD FS (active Directory Federation Services)

STS (Secure Token service)

 

online

Microsoft Online Subscription Program (MSOP)

 

Either type of authentication the security authentication is done and then if successful the user are signed into CRM and then CRM applies the correct security roles, privileges.

Managing Users

There are a number of functionality to manage users and you can find these by going to Settings – Administration

  • Creating users, teams, Security Roles
  • assign/move users to teams, assign security roles to teams and users
  • Disable business units
  • Delete Security roles, Delete teams
  • Move users between teams
  • Manager

 

each user can have one manager assigned to them.  The manager look-up can be found on the user record, I  think it’s used in routing.

access

Security roles – Security Privileges

Business management tab has the security privileges

Security role

Team

User

User Settings

Business Unit

Field Level Security

access 2

Miscellaneous Privileges

Enable or Disable user

Re-parent business unit

enable or disable business unit

re-parent team

 

Disable a user

you cannot delete users in CRM you can only disable them

If you disable a user the user won’t be able to log into CRM

a disabled user doesn’t use a CRM license

 

The records assigned to the user are still active.  Best practice is to assign all the records assigned to the disable user to another enabled user.

 

You need to work out if the user is used in the workings of any workflows, these will still work but it’s not good practice to assign records etc to an disabled user.

Teams

Teams are optional

Two types of teams Access teams and owner teams

Owner Team can own records

Owner Teams can be assigned security roles

Access teams cannot own be assigned security roles or own records.

An owner team can be converted to an access team

An access team cannot be converted to an owner team

Business units and default owner teams

Business units have a team created automatically, the team name will have the same name as the business unit.  Any members created and assigned to the business unit will automatically be added to the default business unit team.

 

It’s a dynamic team which CRM keeps up to date.

It cannot be edited but you can assign security roles and these security roles will apply to all members of the business unit.

default business unit team cannot be re parented, deleted or renamed and it’s members cannot be modified.

default teams can be converted to access teams but you cannot convert access teams to owner teams.

SHARING

In CRM you can share records between users and teams.  Sharing gives the user being shared to the same privileges to that individual record as the user who is sharing.

Sharing bypasses business unit – access level parts of security because when you share records it basically ignore the level (organisation, business unit, user)

 

Sharing records to a team is like sharing the record with every member of the team, except in the PrincipalObjectTable this is only one entry

using the business unit default team you can share records to all users in different business units.

 

Share more than records

 

Not only can you share records but also Charts, Views and Dashboards.

 

Users can only share their personal views, charts and dashboards.

 

When a user shares the components (charts, views and dashboards) they also choose what privileges you want the user/team to have with the component

 

Read

Write

Delete

Append

Assign

Share

access 4

Re-parenting users/teams

 

Re-parenting a user/teams business unit has a drastic effect on the security roles the user or team had, it REMOVES THEM ALL.

 

So if you ever change a user/teams business unit you will need to assign the user or team some security roles in the new business unit.

 

This sounds drastic but it actually makes sense if you think about it logically.  Each business unit has it’s own set of security roles, these are usually copied down from the parent business units.  So when you move business unit, it removes all the security roles and it can’t automatically add them all back because not all the security roles may exist in the new business unit or the security roles could be vastly different with completely different privileges, so the user must add new security roles.

 

This is also true if you reparent a whole business unit because all the users will have had all their security roles removed.

 

Remember users without security roles cannot log into CRM.

 

If a user is re-parented they lose their security roles but they won’t be removed from any teams, this would probably allow them to login to CRM but the user won’t be able to change any personal settings, or view any components the user created.

 

If a team is re-parented then every member of team will lose all their security roles because the team will have had all it’s security roles removed.

 

An efficiency trick is if you want to remove all the security roles for a user or team is to move business unit

 

CRM MVP Question and Answer – Dave Berry

This week’s CRM MVP who comes under the ice cool stare of the Hosk whilst I shine a bright desk lamp right into his eyes is Dave “Chuck” Berry also known as “The Berry” or “D Berry”

Berry is a slippery customer and he used classic question avoidance tactics, getting the answer out of Dave was like trying to nail jelly or herd cats, tricky but fun like trying to herd cats with jelly.

The D Berry shot to fame in his early CRM career with the popular JavaScript grid editor but it was too much too soon.  The story goes that his Mentor Boris Cheesewater one day found Dave crying, he asked what was the matter and the 21 year old Dave Berry said he was viewing items in a grid in CRM 4 but he couldn’t edit them, it’s not fair, why does Bill Gates stand for this.

Boris told him to leave it and accept the CRM 4 grid limitation but Dave wouldn’t, he couldn’t and he worked day and night until he had created an editable JavasScript grid in CRM 4.

The accolades bestowed on Berry soon made him believe the hype and he would then be heard making outrageous comments like

“Don’t tell me about CRM, I am CRM”

“why would anyone need more than 8 tabs on a form”

Dave then took time out from blogging, creating editable Javascript grids for CRM 4, and indeed you can’t even find a link to the JavaScript editable grid.  Dischanted with CRM life, The Berry purposely got himself arrested and sent to a prison in Bhutanese.  Then in 2014 he decided the time was right for a comeback and exploded into Convergence 2014

]

CRM MVP Tanguy Toulard was heard to say

“it was like there was 10 Dave Berry’s, he was a blur of CRM energy”

You can read about Dave’s poor excuses for not updating his blog or creating any editable JavasScript Grids recently

http://crmentropy.blogspot.co.uk/2014/02/im-not-dead-yet.html

 

if you want hear Dave Berry in action, just watch him go in the MVP panel chat.  Unfortunately his joke about the MVP t shirt flew right over the heads of the other CRM MVPS, I did for the record chortle

Microsoft Dynamics CRM 2013 MVP Panel Chat – YouTube

When asked how big he felt Microsoft Dynamics CRM could get, Dave gave estimated this much

 

The Berry has had four MVP awards, if he keeps this up he will have an MVP tower.

berry rockstar

Dave’s MVP biography is a good one

About David Berry

My experience with programming started at the age of 12, and has spanned many languages (mostly object-oriented ones).  Dynamics CRM welcomed me with open arms, and has been an engaging platform for me.  My first experience started with version 3.0 back in 2006, and continues today.  I remain active in the Dynamics CRM community as a leader in the developer category.

I’m honored to have received four consecutive MVP Awards from Microsoft, and welcomed among the many whom I respect and admire.  My goal is to continue advancing my knowledge, experience, and technical aptitude for all things CRM.

I have worked for many companies in many capacities, ranging from commercial router and internet support, to developing utilities and tools to increase productivity and efficiency over previous systems with dramatic results.  My experience has given me keen insight into the users of computers in the workplace, system administration and security practices, and practical, embedded (environment, not system) development.  Currently, I work for Avtex, as a Senior Developer in their Dynamics CRM practice.

On his Google Plus profile he stats he has these bragging rights

Bragging rights
4-time Microsoft Dynamics CRM MVP; Programmer; Stud-muffin

 

I would like to say thanks to Dave for his interesting and funny answers to the Hosk’s  questions and I apologise for my rather random introduction which is completely made up, except for the fact Dave did make the fantastic editable JavaScript grid for CRM 4.

If you want to read previous CRM MVP Q&A by clicking the link on the header – HOSK’S CRM MVP Q&A

 

DAVE BERRY’S ANSWERS

Name, current job title and social media links please

Dave Berry

Senior Developer, Dynamics CRM

crmentropy.blogspot.com

twitter.com/crmentropy

linkedin.com/in/6ix4our/

google.com/+DaveBerryForPresident

 

What does an average day at work look like

programming

What different roles/Job titles have you had whilst using CRM

Senior Developer

Senior Consultant

Developer and Consultant

Systems Developer

The Guy that Makes It All Work

 

What job did you did before you starting using CRM

I done did systems administration (I.T.), support (Helpdesk), and networking (ISP).

 

What was the first version of Microsoft Dynamics CRM you worked with and how long have you been using Microsoft Dynamics CRM

Microsoft CRM 3.0, thankfully.  If I had met 1.2, I think I might have ran in horror.  Can’t use it much, though, too busy trying to make it work for everyone else.  Next question!

 

How do you stay up to date with the CRM

Microsoft Update, which you have to enable separately from Windows Update.  A lot of people don’t get that.  Otherwise, you have to go get all the updates yourself.

 

How do you find time to contribute to the CRM community whilst doing your job

See, when I first started with Dynamics CRM, I was in I.T., and when things work smoothly, the phones are quiet enough to go get into the MSDN forums, or write a blog post.  As a developer now, I never really have an opportunity to contribute while I work.  It all ends up being in my “spare” time.

 

What advice would you give to someone who wants to have a successful career in Microsoft Dynamics CRM?

RTFM

 

What where your first impressions of CRM 2013 and what do you think now.

My first impression:

 

My current impression:

berry crm

It’s easy to gloss over a lot of the UI changes and forget that even more of the raw improvements to the application happened under the hood, and at layers even more deep than their APIs expose.  At first, it looked to me like Dynamics CRM 2011 got a face-lift and a “refreshed” price tag.

Knowing what I do now, about flattened SQL tables, custom Actions, and the concept of “responsive design”, I understand Dynamics CRM 2013 a lot more clearly, and appreciate it even more than every previous version–despite some of the ‘quirks’ that originally discouraged me.

 

What one feature would you add to CRM 2013

It’s not about what I can add; it’s about what I can take away.  When Michelangelo completed “David”, he was anecdotally asked, “How did you do it?”  He replied, paraphrased, “Simple: I removed everything that wasn’t David.”

I want a version of Dynamics CRM where I can uninstall all of the Sales, Service, Marketing modules and behaviors that come out-of-the-box.  I want XRM boiled down to its base components, and everything Microsoft provides built upon an API that allows me to reject their framework and build my own, if I so choose.

 

Most annoying feature of CRM 2013

The use of Iframes as containers for Web Resources.  It constrains the custom inline controls that I like to make, and it artificially expands the number of resources that are loaded (stylesheets, javascript, etc).  I’m not saying Iframes are useless.  I just don’t want to replace a whole section on a form when I really just want one or two custom controls on it (that do things like fly-out).

 

You favourite 2 CRM blogs (I have filled the first one in for you)

1.  Hosks Dynamic CRM blog

2.  Dynamics CRM in the Field

 

What year will Microsoft Dynamics CRM have more customers than Sales force

Crap!  That wasn’t a “yes” or “no” question!  I think you broke my only link to the future!

8 ball

Are you doing more CRM projects with CRM online?  Do you think it will all be online in the future

There will always be verticals for On-Premise, I suspect.  I won’t comment on the customers I work with, but I will say that I’ve personally utilized CRM Online for more “trials” lately, rather than utilize my local development environment.  If you try to develop for both at the same time, the Online environment is a handy place to demonstrate from, since it’s become tremendously more stable and reliable over the last year and a half, and reduces your presentation hardware to a simple tablet.

 

What is the best tool/solution you have used recently

It’s a 3-way tie between TypeScript, Tanguy Touzard’s XrmToolbox, and KendoUI.

 

What CRM certifications do you have, do you try and keep up to date with CRM certifications

I don’t have any current certifications.  My goal this year is to pick up several, but that’s only because I want to leverage them for a pay increase.

 

How important is it to have good business analytical skills working with Microsoft Dynamics CRM.

Not many developers spend time here, and I’m glad that I have–because it gives me a sense for the real footwork the Business Analysts I currently work with have done.  It also helps me to identify and define gaps of process, and diagram the solution well in advance of code writing.  That’s essential, I’ve found, to preventing the wanton dump time into a feature that wasn’t clearly cemented in the outset.  Above all else, it’s integral to identify the needs of the end user–and managers are often poor windows into the lives of their subordinates.  They have to be engaged and onboard, and know that they can be a part of the conversation around this tool they’ll be compelled to use.  I’d prefer that they felt compelled from within.

 

How useful is it to have programming knowledge to become a good Microsoft Dynamics CRM Professional?

Thing is, being an MVP really cemented me on the path of the developer, above and beyond any experience beforehand.  It delivered my uneducated ass from the trenches of I.T.  There’s no disrespect to my I.T. brothers and sisters in that.  My heart was always just in a different place.

I’m proud of where I come from, and the success I’ve enjoyed.  Not many developers have a decade of I.T. experience under their belt.  Working directly with the users of bad software has informed my user-experience side, and working with raw data has informed my application architecture side.

 

What knowledge/experience do you have with software/systems which integrate with Microsoft Dynamics CRM e.g. (sharepoint, SQL Server, Scribe, Etc)

I have enough experience with Scribe to appreciate its functional gaps.  Dynamics CRM is much more dynamic than simple CRUD (Create-Read-Update-Delete, for the uninitiated).  Sometimes I want to Associate, or RevokeAccess (operations available for CRM).  Though I’m desperate to try KingswaySoft’s SSIS adapter, I really don’t spend my time on integration.  I work with our data engineers for these, and they’d speak better to the efficacy of a particular solution, on my behalf.  There is still a fair amount of work to wire some systems together, and I look forward to the day when intermediary SQL tables are no longer considered.

 

How often do you travel as a Microsoft Dynamics CRM Professional?

6 to 8 times a year, I’m putting my body through millimeter wave, and back-scatter X-rays.  I’m hoping that I’ll reach a tipping point, and my mutant powers will transform me into something without carpal tunnel syndrome.

 

Can you see yourself not using CRM in your career in the future

You already broke my 8-ball.  I’m not tempting evil spirits again today.

What is favourite part of being a CRM MVP

Being interviewed about my opinions on things.  I have lots of opinions.  Some of them are informed!  Would you like to hear some more?

 

What are your hobbies outside of CRM

Really looking forward to Titanfall to arrive.  Oh buddy.  Love me some games.  I have proof right here:

berry computer

What was the last book you read and what was the last film you watched

I read whitepapers more than books.  If you can call browsing “C# 2012 and .Net 4.5” book-reading, then I guess that’s it.

Recently saw Mr. Peabody and Sherman with my daughter, and thought it was an expert visit to my past with all the amenities of the present.  I think I was the only one in the theater that got most of the “smart” jokes–especially since they catered them to the adults.  Worthy of high marks, even if it gets heavily sappy at the end!

 

Has CRM ever got you in trouble with your partner/family.

Only when I bring CRM to bed.  And I tell you now, if you’re married, don’t ever do that without permission first.  You can’t just claim that it was an accident, and you couldn’t see where you were going.  Does not work.  Believe me, I tried.

 

Have you friends ever told you to stop talking/tweeting/blogging about CRM? What does your partner/family member(s) think of CRM

I find that a healthy dose of work and responsibility curtails social media engagements.  My friends are probably more tired of my “Which Dave Berry Are You?” quiz results.  Speaking of which, I recently got “Internationally Renowned Dave Berry”:

bery mvps

Pictured: “Representatives of Croatia, USA, Ukraine, and France engaged in peace talks, as implied by the international hand-sign for ‘telephone’.  Alcohol may have been involved.”

 

Tell me something interesting/unusual about yourself

My pedantic nature about documenting and designing paid off a few years back when a client almost jumped ship because they couldn’t “see” what we had spent our time on.  This was for a previous employer, mind you, and they didn’t have the kind of task or project management I now enjoy.  At the time, I was solely doing the work for my own benefit in managing the project’s massive scale.  When the consultant that was managing the project called me in a panic, asking me to send him everything I had, it seemed already that the project was done for.  Upon seeing my work, the client had an immediate change of heart–nearly an impossible feat, I was told.  It was shortly after that I was recognized for my efforts by being told that I would be working even harder and be more responsible; which effectively translated to, “Thank you for saving our major client, we’d like you to do even more work that keeps you up late and takes you away from our family.”

Developers are stones.  The more you have, the wider the foundation they can collectively provide.  Build too much on a small foundation, and the whole thing can come crashing down with the slightest upset.  What developers often need, isn’t more responsibility, it’s more support.  Support to train and learn, to contribute to design and architecture, and to be rewarded with money (we like money, our hobbies are expensive).

 

Who is the first CRM MVP you remember reading/seeing

Might have been Adi Katz or Dave Jennaway.  Persons whom I still have not met, unfortunately.

 

Tips for someone who wants to become a CRM MVP

I think the best MVPs aren’t the ones that tried for it.  In fact, I dare say that those who try for it and get disappointed with the lack of results are more dangerous to our community than those who simply live and love Dynamics CRM.  It’s not that your effort isn’t appreciated by the community, it’s that being an MVP isn’t up to anyone but Microsoft.  Quantity and quality are both measured.  MVPs can be nominated by anyone.  That’s the first step to achieving the award.  I’m aware of MVPs who nominated themselves.  You just have to have an attractive portfolio to back it up.

 

Quickfire questions (choose one option and no explanation)

 

Steve Jobs or Bill Gates

Too soon

 

Javascript or .NET

Script#  (Ha!)

 

Internet Explorer/Chrome/Firefox/Safari

Lynx

 

Wine/Beer/Soft Drink

Scooby Snacks

 

Certifications or Use CRM

Reflector

 

twerking or tweeting

Twerking is like tweeting at work, right?  #guilty

 

books or ebooks

Whitepapers

 

save or autosave

Autosave.  It’s the way of the future. The way of the future.  The way of the future.

 

OnLine or On Premise

Online up front.  On-Premise in the back.

 

Windows 7/Windows 8/Linux/Mac/Other

VMWare

 

work from home or work from office

Home office.

 

Miley Cyrus or Billy Ray Cyrus

Which ever one wins the “Let’s see who can be quiet the longest” game.

 

Vinyl/CD’s/MP3’s/Subscribe

Spotify

 

Zero Inbox/Overflowing Inbox

James Cameron Inbox

 

Early Bird/Night Owl

Batman

 

Do Today/Do Tomorrow

Do or Do Not

 

CRM Developer/CRM Consultant

Can’t we all just get along?

 

Hot Weather/Cold Weather

Weather chooses you!

 

Half Full/Half Empty

50% Progress

 

Hosk CRM Dev Tip – add ID suffix to lookup fields

I got reminded of this best practice twice recently.

Once by a fellow developer and then I also came across these advise whilst studying for the MB2-703 – CRM 2013 customization and configuration exam.

The advice is when you create a field of type lookup then you should add an ID suffix to the field e.g.

Primary Contact

primarycontactid

primarycontactID

Why should you do this?

The reason is it makes it obvious the field is a lookup and not a text, optionset or integer.  below the screenshot shows you how it makes the lookup easy to spot

primarycontactID 1

When a developer is writing some code then lookup fields are usually EntityReference fields and these have a few different values

Entity Logical name

Guid

 

When the developer see’s the ID suffix they will know it’s a lookup and the ID will remind them it basically the guid of a record and they can use this field to retrieve the other fields.

Common Code

Another reason for using this naming system, Microsoft do this so it will mean your fields are similar to Microsoft and as it’s a best practice when you work on other projects with different developers they will hopefully do this as well.

 

CRM 2013 – Simple Dialog with a CRM Query

I have recently done some dialog work and I thought I would note down a dialog example whilst I could remember it.

You can watch the video below, where I go through the steps of creating the Dialog shown in this blog

If you thought workflows are quite quirky then dialog’s are like that except ten times more quirky and  in some ways they are so unlike other things in CRM, in terms of how they work that you will be left scratching your head as to what you should be doing.

Hopefully this blog post will help you get to grips with dialog’s.

The first thing you need to understand is all the definititions

The CRM 2011 wiki is a good place to start

http://social.technet.microsoft.com/wiki/contents/articles/13136.dynamics-crm-2011-dialogs.aspx

This is also a good blog post about dialogs

http://msdynamicscrmblog.wordpress.com/2013/12/02/dialogs-in-dynamics-crm-2013/

 

I will simply things in this blog because most of it you will be able to understand if you done some workflows (and everyone has done some workflows) so it’s really the dialog specific stuff we need to focus on here.

Page

A page is a page in the dialog and in that page you can have lot of prompt and responces

Prompt and response

Prompt and response is where you present the user a prompt/question and you can decide how they respond e.g.

  • Response Type – can be of the following data types:
    • None
    • Single Line – Text, Integer, or Float
    • Option Set (radio buttons) – Text, Integer, or Float
    • Options Set (picklist) – Text, Integer, or Float
    • Options Set (picklist) – Text, Integer, or Float
    • Date and Time
    • Date Only
    • Lookup – Can reference any entity type and related their related lookups

 

You can have multiple prompt and responses on a page.

You can also do the all the workflow stuff like Check condition, update record, start child workflow etc.  below is a picture of what you can do, I have highlighted the differences between workflows

simple dialog

 

One thing which is different in Dialog’s is Query CRM Data and it is quite an unusual piece of functionality.  In this simple dialog I will create a dialog which updates case records associated with an account record.

Which brings me onto another difference between workflows and dialog’s.  Dialog’s can only be triggered on one record, if you select more than one record the dialog button is hidden.  Unlike workflows which you can run on multiple selected records.

The dialog in my example will run on the account entity

QueryCRM which returns  a list of cases with the account reference equal to the account record where the dialog was triggered.

I will prompt and response

OptionSet – with the values for case origin optionset on the case

Text – capture text for the description field on the case

below you can see all the choices

simple dialog 5

The screen shot below shows the CRM query.  Notice you have to select an account in the query and then go to the modify query variables, select the account and copy over the variable for account.

simple dialog 1

Below is a screen shot of the prompt and response for the Case Origin.  You have to recreate the labels and the values in the dialog choices.

Makes sure you select the data type as integer so you can use this value to change the OptionSet

simple dialog 2

below is the dialog showing using the values collect from the Query CRM. You put the records(select cases) in the prompt and then you can show the query records in an optionset which the user can select one a case associated with the account from.

simple dialog 3

Finally I use the selected case and update the origin and description fields with responses collected earlier.

simple dialog 4

So there you go there is a simple CRM 2013 plugin using some of the core dialog functionality.

Dialog’s offer a very useful tool in CRM and they work pretty well but they take some getting use to and there are definitely a few tricks you have to learn.