Tip #169: Update related records with a workflow

Ever wish you could use a workflow to update related/child records? For example, when I update the address on an account, update the address on all of the related contacts.

You can, with the help of the very helpful CRM 2011 Distribute Workflow Activity assembly written by Alberto Gemin on Codeplex.

While this says “CRM 2011” in the name, it works fine on CRM 2013 and CRM 2013 SP1.

  1. Import the solution from Codeplex
  2. Create your child entity workflow(s). In this example, create a workflow for the contact entity, check the box to run as a child workflow, uncheck the box to run on create of a record, and add your desired step.
  3. Create the master workflow that will trigger the child workflow. In this example it would be a workflow that runs on update of the address fields.
  4. Add a step. If you have successfully deployed the solution, you should see a new step called “DWF AG Utilities:Distribute One to Many.”
  5. In the step properties you need to specify two values: the database name of the 1:N relationship and the child workflow you created in step 2.
  6. Publish the workflow.

Now, every time the master workflow is executed, it will run the child workflow on each related record. This works with both background (asynchronous) and real-time (synchronous) workflow processes.

 

Tip #168: Renumber the pipeline stage

When you use Business Process Flow, the stages are categorized using the stage category option set. The categorization allows you to have standard process stage categories across multiple processes. While your various process flows may have stages with different names, the stage category provides consistency between process flows and allows you to chart opportunities with different sales processes in the same chart.

When you change the process stage of an opportunity, the process stage category is captured in the “Pipeline Stage” field of the opportunity. This field is a text field, and the value captured is a chronological number with the name of the category of the selected process stage. Charts like the standard Sales Pipeline chart use this field, and the number helps sort the chart funnel in the correct order.

One thing users may notice when viewing the chart is that the numbers are not meaningful. They may start at any number. For example, in this chart the numbers start at 8. When you move to your production environment, they may start at number 13.

Screenshot 2014-06-28 21.00.18

Here’s how you can renumber the values in the pipeline stage field:

  1. Edit the “Stage Category” global option set
  2. Remove any options you are not using.
  3. Add an option to the option set.
  4. Publish
  5. Remove the option you added in step 3.
  6. Publish

Now when you change the opportunity process stage, the numbering should start with 1.

Note–this does not modify the existing opportunities. They still retain the former value. You will need to update these records.

  • If you have a small number of opps with mis-numbered process stages, manually open each opportunity and click “next stage” then click the back stage arrow.
  • If you have a large number of opps with mis-numbered process stages, use a workflow to update the opportunities and set the process stage to the currently selected process stage.
  • You can also use the export to Excel feature to bulk update process flow stage. Create a view that includes the process flow stage (not pipeline stage), export to Excel, checking the box to export for reimport, then import using the CRM import utility.

Once you do this, your sales pipeline chart will be numbered more logically.

Screenshot 2014-06-28 21.06.25

 

Tip #167: Where did my navigation menu go?

On one of your forms you notice that you no longer have the navigation bar/navigation menu. Typically this is the right-most drop down menu on the top of the form, but for a specific entity, you notice it is missing.

Click the “Form Properties” button and go to the “Display” tab. On this tab there is a checkbox for “show navigation items.” If this box is unchecked, the navigation menu will no longer display on the form. One of your customizers may have unchecked this box.

This is a useful feature for simple forms without many navigation item links.

properties

Tip #166: Become role customizer ninja

If you frequently modify security role and your wrist hurts because of all tiny mouse movements, there are some undocumented explicit links on the role dialog that could make your life much easier.
Role Editor

Clicking on the entity name (e.g. Account) will cycle all privileges for this entity (i.e. Create, Read, etc) through all access levels (i.e. none, user, business unit, etc).

Clicking on the privilege name (e.g. Create) will cycle this privilege through access levels for all listed entities.

Tip #165: 1:1 with security twist

Usability of 1:1 relationships stretches far beyond UI candy. They can become a very useful tool that secures parts of the same logical record. For example, financial services company might use account entity to hold information about their customers but due to Chinese walls within the company, investment manager should not be able to access tax profile of the customer while taxation specialist should not have visibility of the investment details.

Create two new entities, Tax Profile and Investment Profile, create 1:1 relationship between Account and each of these entities then configure and apply appropriate security roles that limit access to one or another profile entities for specific users. That way, investment manager will not have access to tax information (or will have read-only access only, for example) while taxation agent will see bupkis instead of Cayman Islands account details.

Tip #164: Not all roles are created equal

It’s a reasonably well-known fact that recreating roles from scratch and adding all privileges to replicate one of the system roles is not the same as copying that system role. There are some hidden privileges that are not exposed via security dialog.

This topic has been discussed and documented for CRM 4.0 and for CRM 2011.

In CRM 2013 the role dialog has been seriously cleaned up and hidden roles were no more (for example, previously missing prvCreateApplicationFile privilege is now explicitly exposed via Application File entity).

Enter SP1. If you create new role and make it radiate green by ticking all the boxes, turns out that this role will be missing some 64 privileges that are in the System administrator role (helpful script). Comes as no surprise that most of the missing privileges are related to new SP1 functionality in the area of SLAs and entitlements. Unless security dialog is completely revised, CRM functionality will always be one step ahead and the advice stands: copying system roles and creating from scratch are not the same.

Tip #163: Create a 1:1 relationship

Creating a 1:N  or N:1 relationship between two entities is very straightforward, but what if you want to do a 1:1 relationship?
For example, say you have a subprocess that needs to be owned by a different user than the account owner, or you have a child relationship where only one record should be associated with the parent?

  1. Create a 1:N relationship and a N:1 relationship between the two entities.
  2. On the relationship definition, set the related records grid not to display in the navigation area
  3. Create a workflow that upon create of the secondary record updates the lookup field on the primary entity record.

For example: I have a custom project entity and I am adding a related technical audit entity for technical review of projects. Sure I could just add additional fields to the project entity, but this process is owned by a different user than the owner of the project, and adding all the fields will push me over the 75 field limit for CRM for tablets.

I create the technical audit entity and create a 1:N and N:1 relationship between projects and technical audit. I then add both lookup fields to their respective entities.

In this example, I want a technical audit record created every time a project reaches the approved stage. So I create a workflow that upon update of the stage to approved, creates the project technical audit linked to the project, then updates the project technical audit lookup field with a link to the technical audit

The result is a two-way relationship with a lookup field on both sides. Benefits include:

1.      I can look at a project and see that a tech audit has been created for the project.

2.      Give that it is a 1:1, nobody can create multiple related tech audits by mistake

3.      This gives me the flexibility to show technical audit fields on project forms and views and project fields and technical audit forms and views via quick view forms.

Tip #162: This action cannot be completed during synchronization

In CRM for Outlook, sometimes when you click the “track” or “set regarding” button, you will get an error telling you that the action cannot be completed during synchronization. I’ve noticed that sometimes I see this when tracking from the Outlook 2013 inbox view, rather than tracking from an individual email form.

If you see this error every time you track, it can be resolved by deleting the SQL CE database on the Client machine:

1. Close Outlook
2. Browse to C:\Users\<loggedinuser>\AppData\Roaming\Microsoft\MSCRM\Client
3. Delete the EmailCache.sdf and the OutlookSyncCache.sdf files
4. Browse to C:\Users\<loggedinuser>\AppData\Local\Microsoft\MSCRM\Client
5. Delete the CRMcache.sdf file and the GUIDFalse.sdf file <—the GUIDFalse.sdf file will be a long alphanumeric name
6. Re-launch Outlook and the files will get recreated.

Tip #161: ADFS vs Citrix for external access

When deploying Microsoft Dynamics CRM on premises, ADFS is the recommended approach for providing external access to the application. However, alternative methods, like Citrix and application virtualization can also be used. These alternative methods can do a good job of providing access to the core CRM web application, but do not provide full support for all CRM interfaces. It really depends on how users need to access the application.

ADFS Citrix
PC web browser Yes Yes
Outlook client Yes Yes (in Outlook virtualized on Citrix host, not natively installed Outlook)
Tablet browser Yes Citrix can be used to access the CRM PC browser experience on a tablet. This is not the tablet optimized browser experience you get when the CRM URL can be accessed directly from the tablet.
Tablet app Yes No
Phone app Yes No

 

Tip #160: If all I have is a Surface, how do I test Windows client?

My work laptop is a mighty Lenovo W530 with upteen cores, bazillion GBs of RAM and quadrillions of TBs of SSD drive space. The only problem is that carrying it around keeps my chiropractor very busy. So when I travel, I dock this monster behind the firewall and carry around something like Surface or the other tablet.

When I need to test something on a client, I can RDP back into my bazooka of the laptops and fire up appropriate VM. This kind of works but it’s always felt like bending backwards.

Now, there is better way to do client testing. If you are MSDN subscriber (if not, why not?) then not only you get $150 monthly credit in Azure, you can now provision Windows 7 and Windows 8.1 machines:

Windows 7 & 8 in Azure

That made my upcoming overseas trip about 17kg lighter (or whatever’s the weight of the Lenovo’s powerbrick).

Cost? Just skip that double caramel cappuccino and you’ll be able to afford 2 cores, 3.5GB RAM (A2 image) for a sweet $3.80 per day. Or how do you feel about 16 cores, and a whopping 112GB RAM (A9) for a cool $4.90/hour? Achievement unlocked.