This is a blog about my experiences with Microsoft Dynamics CRM, tips and tricks as well as news from the CRM community.
Saturday, November 12, 2016
Que hay de nuevo en Dynamics 365: Mesa de Expertos interactiva Nov 2016
No te pierdas la Mesa de Expertos este próximo miércoles 16 de Noviembre para aprender sobre las novedades del nuevo lanzamiento que estará disponible en Diciembre 2016 para CRM Online.
Si tienes preguntas esta es tu oportunidad para que respondamos a tus preguntas. Simplemente envia tu pregunta por anticipado medio de Twitter con el hashtag #enfoco365.
Para registrarte en el evento sigue este link: http://www.comunidadcrm.com/blog/event/16-noviembre-microsoft-dynamics-365-comienzo-una-nueva-mesa-expertos/#.WCdO8PkrKUk
Dependiendo del tiempo, haremos demostraciones de los nuevos features tal como la nueva navegación, el nuevo diseñador de procesos, los nuevos editable grids y el nuevo modelo de aplicaciones introducido por Dynamics 365. Esperamos verlos pronto!
Thursday, October 13, 2016
How to modify the Quick Create form for tasks and activities
Thursday, October 6, 2016
Transporting SLAs in a CRM solution
Friday, September 30, 2016
Tuesday, September 27, 2016
State Machines in CRM for Status Transitions
Monday, September 26, 2016
CRM SLA Failure and Warning times, not what you would expect!
Tuesday, September 20, 2016
CRM Alternate keys with OptionSet fields
Monday, September 19, 2016
CRM Advanced Find with N:N Relationships
- · Find all accounts in the “Banking” industry
- · List the accounts with industry code FIN002
Monday, August 15, 2016
Business Rules vs. Sync workflows in CRM
- Business Rules are contained in the entity itself in the solution which I find somewhat cleaner and more organized, you can review which business rules apply to each entity and when exporting a solution (CRM 2016+) decide which business rules to export. You can argue processes have a primary entity and you can use that field for the same “organization” purpose (sure I give you that).
- Business Rules are actually implemented as sync workflows! The business rule is nothing more than an abstraction of a sync workflow but behind the scenes each business rule is converted to a sync workflow. However, I find the abstraction useful, mostly because I can interpret business rules a lot easier in my head than workflows. If you export a solution with a business rule you will notice the business rules are actually “processes” just like sync workflows so there is a conversion layer from entity business rules to sync workflows. What this means is that there are basically 2 separate designers (process designer and business rule designer) that produce the same workflow XAML definition that is executed by the same runtime. While both workflows and business rules are actually stored in the “Process” table/entity there seems to be a slight difference in the triggers: The workflow triggers are stored in the same Process table but the business rule triggers have their own “ProcessTrigger” (anyway that’s all implementation details).
- Workflow designer is quite outdated and probably reaching its end of life. However, it seems Microsoft is investing more and more in the business rules designer and supporting more and more scenarios with each CRM release. I personally find it more pleasant to work with the business rule designer than the old process designer.
Tuesday, July 19, 2016
SLA Behavior when Reopening CRM Cases
In my test SLA I give the users 5 minutes to resolve the case before the SLA is considered as “failed”. Then I created a case and resolved it after 1 minute which causes the case to succeed the SLA. I can see in the associated SLA KPI instance that everything looks as expected:
Friday, July 1, 2016
Monday, April 11, 2016
Including Reference Assemblies in plugins
The Problem
This has been a feature gap since plugins were introduced in CRM, you often want to reference external dll libraries from within your plugin. First, let’s look at how the CLR (.Net) loads referenced assemblies in order to understand the problem a little better. During runtime, what happens with referenced assemblies is that the CLR will try to load the referenced assemblies from some predetermined locations. For example, it will try to locate and load that assembly from the GAC or from the same directory as where the current process is executing. When you compile an assembly and it has other references, what happens is that the referenced assemblies get dropped in the same bin folder as your compiled assembly so they can be easily located and loaded at runtime.
The Solution
1. Add ILMerge Nuget to your plugins project
3. Now you simply need to edit your project configuration in Visual Studio such that when you build your plugin it automatically merges it with your reference assemblies (so you will never have to manually do ilmerge). To do this go to the “Build Events” tab of your project settings and under “Post Build event command line” box enter the following:
Monday, March 14, 2016
How to set EntityCollection output parameters in custom actions
Monday, January 11, 2016
OptionSet vs Lookup for implementing lists in CRM
Imagine you want to capture the "Industry" of your leads/accounts as this information might be valuable for reporting and BI. Every organization has different definitions of "industries" because there is no global standard list of industries that is useful for everyone. So you decide to create and maintain your own list of industries. Now the problem becomes: Should you implement this list as an "Industry" entity or should you simply create an OptionSet with the list of industries?
As everything in the technology consulting industry (pun intended), the answer is always: It depends! There is no exact formula of science to solve this dilemma but I've had numerous discussions with colleagues and customers in this respect and I thought of gathering some guidance that might help you decide:
1. How often does this list change and who maintains it?If your list of industries is changing often or if you expect business users to contribute by maintaining this list, it is recommended you implement as a custom entity rather than option set. The reason is that the custom entity adds richer flexibility to create, update or remove values without having to involve IT. You can easily control who can edit the list by leveraging the security roles on the custom entity. However, if your list rarely changes (e.g. list of countries) and it needs to go through IT then you should probably use Option Set.
2. Do you need to support multiple languages?For us in Canada we usually always implement CRM in both English and French. If your industry list is defined as an OptionSet you can support languages much easier because it is just a matter of translating labels so that each user will always see the list in their preferred language. However, if you use a custom entity, the list is data (instead of metadata) and data does not have the notion of language. Things get complicated here. The typical solution is to use a concatenated primary fields in which a workflow automatically appends English and French labels together with a separator. For example you have an industry record called "Travel / Voyage". But this gets too complex if you have more than 2 languages and creates unnecessary long labels. Not to mention language laws dictating which language should appear first can cause a headache. For this aspect, the winner is by far Option Sets.
3. Do you need to capture additional fields?Imagine in our example, you also need to capture an industry code and size along with the industry name. It would be almost impossible to achieve this with Option Sets so you would definitely need to implement your industry list as a custom entity. Even if today you only need the name, consider whether it is likely that in the future you have to capture additional attributes and if so, you should favor using a custom entity over Option Sets.
4. Environment transport and synchronizationThe nice thing about option sets is that when you transport a solution you are also transporting all the labels and values to your target environment and you are sure that the list is consistent in your dev/test/prod environments so you can rely on specific values existing in the list. However, if you implement as an entity, you will never know who will create, update or delete values from one environment and not the other. So you will end up with different value in each environment. Furthermore, you might end up with equal values but different Ids. For example, you might have industry "automobile" in dev with a specific GUID but the same industry in production with a different GUID. This takes me to the next point about:
5. Workflows and reports/viewsYou might want to do industry specific reports or workflows and include logic such as "if this customer is in the banking industry then do X". Using OptionSets this is safe because the value "Banking Industry" is consistent across all environments so you can add such condition to your workflow. However, if you use a custom entity, you cannot rely on values having the same GUID in all environments so you cannot define such logic safely. The workaround would be that in your workflow/view/report you say "if industry.name contains 'banking' then do X". This works in most cases but is not completely safe; for example, somebody might have renamed "banking" to "finance" and suddenly your workflow is broken. The safest is to use an OptionSet which you are sure will exist for a specific value. If you rely on reports and workflows such as the one described above you might be better off using Option Sets.
6. Dependent listsConsider whether your list will have another dependent list. For example list of states/provinces depends on the value selected from the list of countries. You can achieve dependent lists as both OptionSets and custom entities. The only difference is that for custom entities it is easier because you don't need to write any code, simply configure the form to show only states/provinces related to the country selected (assuming there is a relationship between state/province and country). I think this is the least important factor but is a small advantage of custom entities as it is easier to filter the list based on another related value. If you define your list as a custom entity you can even do advanced filtering such as displaying only industries which exist in the country of the current lead (assuming N:N relationship between country and industry). That can be much harder to do via OptionSet (custom development) while it is just a matter of configuring the form in the case of custom entity.
I usually go in the order above to make a decision as the first items have more impact than the last items of the list above. I hope this can help you assess the best solution for your situation, let me know if you have other considerations I missed!
Wednesday, October 14, 2015
Comunidad CRM y la Mesa de Expertos – Otoño 2016
Announcing the Expert Table for Fall 2016 for my Spanish readers, don’t miss out this event!
Come lo ha venido hacienda la Comunidad CRM, estará presentando las novedades de CRM 2016 por medio de una mesa redonda con la participación de varios MVP de habla hispana . Desafortunadamente no podré asistir a este evento puesto que estaré de viaje. Sin embargo, no se pierdan esta increíble oportunidad de aprender sobre las novedades de la próxima versión de CRM y sobre todo la oportunidad de hacerle preguntas a nuestros expertos en vivo. Registrate aqui! Este es el extracto de introducción a la próxima mesa:
Si, leíste bien. CRM 2016. Ya se asoma una nueva versión que estará disponible tanto en CRM Online como On-premises y cargada, muy cargada de novedades por demás interesantes.
Es por ello que los expertos más destacados de habla hispana en Dynamics CRM se vuelven a reunir para compartir las novedades de esta nueva versión, entre otras:
- La nueva experiencia de servicio – el Interactive Service Hub
- La nueva versión de la Base de Conocimiento
- Power BI para Servicio
- La nueva app para Outlook
- La nueva búsqueda
- Trabajo desconectado (“offline”) y novedades en las apps móvliles
- Plantillas para integración con Excel y Word
- OneDrive
- Novedades de la plataforma
- Social CRM
Y hay muchas más novedades! Inscríbete y compártenos que opinas de CRM 2016. Recuerda utilizar #mesa2016.
Aprovecho también para felicitar a los líderes de la comunidad de todo su esfuerzo para compartir contenido y crear conocimiento a nivel mundial sobre CRM en español. También los invito a navegar el sitio para ver la cantidad de recursos y cursos a su disposición.
Tuesday, October 13, 2015
Don’t forget your case title and customer
Case is a special entity in CRM because it has many out-of-the-box special logic. Sometimes this can be problematic as it forces us to use some fields we might not need.
I’ve always found many customer scenarios in which the “Customer” field adds no value to the case and we would like to remove it. Although less often, you might have found a scenario in which the “Title” field of the case is also not needed. The bad news is that CRM forces you to use those 2 fields in the case, otherwise you might encounter some issues.
For the “Customer” field you can get around it but you need a plugin which is going to set your customer to a dummy hard-coded customer on the Pre-Validate operation whenever a case is created. I haven’t seen this work with sync workflows or business rules (although I haven’t investigated much), unfortunately seems like a plugin might be required for this. Once you have this plugin you can simply hide the Customer field from the form, make it read only and remove this field from all the views. Then your Customer field will be used but not really used. Note that in order to hide this field from the form you might want to make it read-only and then move it to a new "section and hide the entire section. This will help you keep things clean on your form by moving all the “unused” but “locked” fields in a hidden form section.
Regarding the title field, CRM will not prevent you from not using this field. You can also hide it an make it read-only and things will seem to work fine. However, as soon as you start using SLA’s you will run into this problem:
Workflow '{F5245D54-9BA6-4E4B-AB86-9131A076FB4D}' failed due to error: Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)
at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)
at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.ExecuteWorkflowUsingInvoker(Activity workflow, ICommonWorkflowContext context)
at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.StartWorkflow(WorkflowActivationData activationData, ICommonWorkflowContext context)
As you might know, SLA works as workflows behind the scenes. As soon as you create SLA’s there are some background processes (workflows) created which represent the SLA you have created. Some of these workflows are synchronous and it turns out that if your case has no title, the workflow fails with the above error message preventing the creation of the case. This can be easily fixed by either using the case title or placing some dummy value in it. In our case we simply copied the ticket number into the case title. However, one must admit that it is difficult to arrive to such conclusion from the error message above, that is why I’m sharing this finding, I hope you find it useful!


































