Tip #359: Why don’t I see any records in CRM Online

A recent post in the Facebook Microsoft Dynamics CRM group asked why, after adding a CRM Online trial to an Office 365 subscription, a system administrator could only see the service and settings sitemap areas.

Abhishek Pattanaik's photo.

The reason is that the user in question had Administrative user access mode. In Office 365, all Global Administrators are granted System Admin in CRM Online, but if they don’t have a CRM Online license associated with their user, they will be limited to Administrative user access mode. This gives them access to administrative functions, like user management, but not to any front-end entities or records.

To grant the user full read/write access, apply a CRM Online license to the user in Office 365.

Tip #358: How to delete deleted report

No, it’s not a typo – I am going to talk about deleting the deleted.
– “What?!”
Let me explain.

We all have that Rupert/Vernona/Joe/Jill on our team who think they know best and, for some inexplicable reason, management agreed and granted them privileges sufficient to deliver some real damage.

Like going into SQL Server Reporting Services manager and manually renaming CRM report from there because “what is this nonsensical report {numbers-numbers-letters-numbers}, let me fix that for the business users and give them a nice and clear name they can understand”. Or, better yet, simply deleting the report because “with the name like this, the report is obviously a mistake or system generated and can be deleted”.

When that happens, every time you try to change anything in CRM for this report or even simply delete it, you will receive one of the following messages:

Reporting Error
Error occurred while setting property values for the report. {0}

Reporting Error
Error occurred while deleting item from the Report server.

That’s because CRM reports find their SSRS counterparts by those {numbers-numbers-letters-numbers} otherwise known as GUIDs.

Fix is very straightforward:

  1. Find GUID of your report by simply opening it for editing. URL will contain the GUID.
    report1
  2. Go to your SSRS reports in the browser
  3. If report was simply renamed, find it and change its name to the GUID above – and it’s as good as new.
  4. If report was deleted then download definition of one of the existing reports (does not matter which one), then click Upload File, pick the report definition you just saved but set the name to the original GUID
    Import renamed report
  5. Once done, simply delete that report in CRM.

After the cleanup is complete, go and physically swap J,K,N, and M keys on their keyboard. And glue the DEL key shut for the full measure.

Tip #357: Multiple entity search in Outlook

¡Ay, caramba! Do we have a guest or what! Pablo “CRMGamified” Peralta takes the stage today with his awesome tip translated from the fuente española

Looking for ways to have the Search options always visible in Outlook as it happens in web interface, I found a way that while is far from ideal, is close to what I was looking for and our users found it is very useful.

The way is:

  1. From Outlook, let’s go to any  CRM option where the Search icon is displayed. example:
    Search icon
  2. There we click the right mouse button and select the “Add to Quick Access Toolbar” option:
    Quick Access Toolbar
  3. Now, we have our way to search by multiple entities always visible here:
    Multi entity search

Now, why did I told you that this was not ideal? Well, because at least in my case, I found that  the search bar disappears once I closed Outlook. So, every time I open Outlook I must do the same steps.

They’re just a couple of clicks that will save me of doing many more clicks, but it would be ideal if the configuration is conserved.

Hope you like it and find it useful. Greetings!

Tip #356: When Publish All Fails

So you imported a large solution, perhaps an upgraded solution in a CRM upgrade, and when you publish the entire solution, you get a generic SQL error. What should you do?

  1. Go to Settings–>Customization–>Customize the System.
  2. Select Entities
  3. When the entity list appears, select 5-10 entities at a time and click “Publish.”
  4. Continue until you work through all updated entities.
  5. If you hit the error, publish each entity in the selected group individually to identify which entity has the issue.
  6. If you get to the end and don’t hit the error, it was most likely a SQL timeout. You should then be able to Publish All successfully.

Tip #354: No code contextual sequential auto-number

When you add a child entity, it is best practice to populate the name field, but sometimes it can be difficult to come up with a name that makes sense. Say you have an entity that is the child of an account/company record. If you leave the name field blank, if any record looks up to that record, the lookup field will be blank. Plus, say you want to ask the account manager about the record, without a distinct name, it will be difficult to let them know to which record you are referring (sure you can email a link, but follow along).

One approach is to auto number the records with the name of the parent to provide a distinct record name (Acme-1, Acme-2, Acme-2). However, there is no standard way to auto-number records. Sure you could write a plugin, but if you don’t have those skills or you don’t want to take the time, there are additional approaches that do not require custom code.

So in the scenario where you want to auto number records with a combination of the parent record and a sequential number, the following is a no-code approach that I have used.

  1. Add a whole number field to the parent entity called “Counter.” Using a system business rule, default the value to 0.
  2. Add a workflow that runs on create of the child entity.
  3. Add a step to the workflow that increments the counter field on the parent record by 1.
  4. Add a step to the workflow that updates the child entity record and sets the name field to a combination of account name – counter field value.

The result will be a dependable synchronous automatic number that should work for basic requirements. Note that it will not re-use numbers should one of the child records get deleted. If more complex auto-numbering is required, a plugin is the recommended approach.

Tip #353: Notes and activities – where did they go

If you follow our advice and do not do anything prematurely, the default form for your entity will look nice and lean, mostly due to the absence of the middle pane which is default home for activity feeds, activities and notes.

If you decide that you do need activities and notes, after all, you will find that system duly adds the functionality but leaves your original form intact. To bring the pane, edit the form and click Insert > Notes command:
Insert notes pane

When you do that you may find out that Notes are back but not the Activities tab. If that happens, follow these steps:

  • Create new solution and add your entity into it
  • Export the solution as unmanaged
  • Extract customizations.xml file from the archive
  • Find <FormPresentation> for the form and make sure that the value is 1 and not 0
  • Save the file, update it within the solution zip file, import it back and publish

This behaviour is due to the bug that looks like fixed in CRM Online (both 2015 and Update 1 Preview).

If you’re still yearn for social, make sure that your entity is enabled under Settings > Activity Feeds Configuration

Thanks to Larry “Tex” Lentz for keeping the subject alive, Shan “Grillmaster” McArthur for the terse but effective solution and to Adam “Last Word” Vero for this final warning:

You can’t use a notes control for an entity that is not enabled for Notes, so unfortunately you cannot have just activities, or activity feed posts.

Tip #352: When you can’t publish a report

Sometimes when writing SSRS reports for CRM, you will find that the report works fine in Visual Studio, but will fail when you upload them to Dynamics CRM.  This can be frustrating, because it can sometimes be difficult to identify the cause of the issue—it works fine when you preview it in Visual Studio, but when you upload it, the upload will fail, and typically the error message created will be very generic—something to the extent of “Call your System Administrator.”

Typically when you see this problem, it has to do with SSRS functionality specific to CRM reports.  Here are some of the top causes that I see reported by users:

  1. Data source—When you create an SSRS report, you have the choice of using an Embedded data source or a shared data source.  For CRM reports, you must use an embedded data source.  If you use a shared data source, your report will preview in Visual Studio, but you will not be able to upload it.
  2. Hidden parameters—If you use the special hidden CRM parameters, such as the CRM_URL parameter to build dynamic hyperlinks to CRM records, if you don’t set them up properly, the report upload to CRM will fail, but it will still preview OK in Visual Studio.  Make sure that the parameters are set to hidden and allow null values.
  3. Pre-filters—When using CRM Report Pre-Filtering, if you use pre-filtering incorrectly, sometimes the report may fail to upload correctly.  In this case, like the others, the report will preview without error in Visual Studio, but will have issues uploading to CRM.

Troubleshooting

So now that we’ve talked about what some of the common causes for the “works in Visual Studio, but not in CRM” issue, how do you troubleshoot what is causing your report issue?  The best place to start is the event log of the CRM Server.  If you get a “Contact your Administrator” error message, frequently you will see a more detailed error message.  Recently I had a user experiencing this issue, and I checked the event log on the CRM server.  I found the following error message captured in the event log:

The parameter ‘CRM_URL’ has no default. A default is required for all non-nullable parameters without a prompt or the valid values list has to contain Null.

After modifying the SSRS report CRM_URL parameter to accept null values, the report could be successfully uploaded.

Tip #351: Tracing for plugins and custom workflow activities

CRM Online continues to improve on the existing features, as Andre “I’ve got 88 in my handle” Margono noticed when looking at the tracing functionality. ITracingService was available to the savvy developers since CRM 2011, however, the catch always has been that trace is only available when things go wrong, exception kind of wrong. Enter CRM Online 2015 Update 1 (currently in preview).

From the words of Andre himself:

I just noticed the new plugin/custom workflow tracing and logging functionality in my preview instance and now the content has been updated with the information: https://msdn.microsoft.com/en-us/library/gg328574.aspx#loggingandtracing

I think it is a great addition to the plugin/WF capability to keep track of the performance of the custom code where it might breaks.

Plus with this note: “If your custom code executes within a database transaction, and an exception occurs that causes a transaction rollback, all entity data changes by your code will be undone. However, the PluginTraceLog records will remain after the rollback completes.” the tracing functionality won’t interrupt the transaction as it happened today if I want to put custom logging functionality.

Tip #350: Avoiding duplicate contacts when upgrading

When you upgrade CRM for Outlook, one thing to watch out for is duplicate contacts in Outlook. The reason contacts can get duplicated is that if you use Outlook synchronization for contacts and you remove or reinstall the client, the local synchronization database gets replaced. When you reinstall the client and the synchronization runs, a new copy of your synchronized contacts will be downloaded.

To avoid this happening, try to upgrade in place. In-place upgrades do not break the synchronization, and contacts should not be duplicated. If you are going one version in the upgrade, this is the recommended approach. And consider moving to server synchronization so you won’t have to worry about this for future upgrades.

If you are upgrading across multiple versions, in-place upgrades are not practical, and as a result, you will need to uninstall the Outlook client and install the new version. In this case, duplicate contacts cannot be avoided, and a strategy of remediation is your best course of action.

  1. Turn off synchronization in the Outlook client.
  2. Move all synchronized contacts to a different folder (you can tell which are synchronized by looking at the icon. It’s the two-headed guy).
  3. Uninstall the old version of the Outlook client.
  4. Install the new client and synchronize.
  5. Once the contacts are re-synchronized, you can delete the old contacts from the folder you moved them to.