CRM2016 : Use DELVE to get relevant trends

One of the most amazign features of the latest version of MS CRM is that actually you can integrate Delve into your dashboards in order to get the relevant trends and documents. If you have already used Delve with O365 pack, you would have an idea about it. If you don’t let’s say that it’s like a search engine that automatically pushes content according to what seems to be relevant for you.

To add it to a dashboard, first of all you should check these prerequisites :

  • Delve is available for Dynamics CRM Online 2016 only
  • You should have an Office365 subscription or a subscription to an online service such as SharePoint or Exchange Online
  • SharePoint Online
  • Enable Server-side synchronisation (Check it in Dynamics CRM Settings==>Document Management==>Enable Server-Based SharePoint Integration) and have at least one active SharePoint site.

Afterwards you could enable Delve by navigationg to Settings==>Document Management ==>Manage Office Graph Integration

manageofficegraphintegratio

enabledelve

 

Once you’ve checked Enable Office Graph Integration checkbox you go to your dashboards to add a new Delve Component.

 

.

 

Advertisements

Easily Export Audit Logs

If you have already used Audtining in Dynamics CRM, you may have noticed that you cannot export logs. This is an issue I have been facing recently when I was asked how we can perform stats and measure CRM’s use.

Fortunately, there are two ways to get that logs on an Excel file. The first method that we wont use is to query AuditBase SQL table. The second one, much easier, is to use an amazing tool : MSCRM ToolKit that you can download here http://mscrmtoolkit.codeplex.com/

Here’s how:

Once you’ve downloaded the tool, extract the zip package and launch MSCRMToolKit.exe and go to Connections Manager to enter your CRM connection information

 

sshot1

 

Once connected, you can go to Tools–>Audit Export Manager

sshot2

 

Now you can filter data you want to export, click save and then run Profile

sshot3

 

 

 

.

 

 

 

 

 

Interact with business process flows with Xrm.Page.data.process object

Dynamics CRM 2015 Update 1 offers a new interesting capability. You can now interact diretcly without trying to get the process ID as we used to do in the previous versions. So the magic object is Xrm.Page.data.process

It allows you to get the current process by using ActiveProcess method or the active stage by using ActiveStage method. There are many amazing other methods that can be very useful. I invite you to try them, here is where you can find all of these methods: https://msdn.microsoft.com/library/dn817878.aspx

 

Hope you like it!

 

 

 

.

Hide subgrid add button (+)

For some user experience issues, sometimes you may want to hide the + button on a subgrid. This is how to proceed:

If not already done, download JQuery and add it to your webresources then add the following HTML code as a webresource in the form containing your subgrid.

 

<script src=”/webresources/new_Jquery.js”></script>
<script>
$( document ).ready(function() {
if (parent.document.getElementById(“subgridname_contextualButtonsContainer”) != null ) {

parent.document.getElementById(“subgridname_contextualButtonsContainer”).style.display=’none’;}

});
</script>

Where subgridname must be replaced by your subgrid name.

IMPORTANT: Hiding the + button does not mean users cannot create new records, allowing or forbidding users to create new records should necessary be configured in their security roles.

 

 

 

 

 

.

CRM 2015 SDK: How to recognize user’s form factor and client

When you’re working on multi-device projects in Dynamics CRM, sometimes you need to know the form factor that the user is currently using in order to execute or note some UI actions using Javascript. Dynamics CRM 2015 makes it easier and suggests using the context object with getFormFactor() method that returns an integer between 0 and 3.

Javascript Code: Xrm.Page.context.client.getFormFactor()

Return Value Form Factor
0 Unknown
1 Desktop (Warning that does not mean Computer, it can also be a desktop version used from a tablet navigator)
2 Tablet Application
3 Phone Application

Let’s apply this to a simple example, we will run an alert box containing the name of the form factor on form loading:

Javascript Code: function myTestFunction()

{

var formFactor = Xrm.Page.context.client.getFormFactor();

if(formFactor == ‘1’) { alert(“Desktop”);}
else if (formFactor == ‘2’) { alert (“Tablet App”); }
else if (formFactor ==’3′) { alert (“Phone App”); }
else { alert (“Unknown form factor”); }
}

 

To get which client the script is executing in, you can use:

 

Javascript Code: Xrm.Page.context.client.getClient()

The return value of this method is a String. These are the returned values:

Client Value
Browser Web
Outlook Outlook
Mobile Mobile

 

For more client-side context methods, you can visit https://msdn.microsoft.com/en-us/library/gg334511.aspx

 

 

 

 

.

CRM 2015: Yes you can clear a field with Business Rules

If you have experienced Business Rules in Dynamics CRM 2013 you probably had to build a BR where a field must be cleared. Well that was not possible and we used to either make a two lines script or create another hidden field which is always empty and match the field you want to clear to that one. Fortunately CRM 2015 came with a new update making it possible when choosing a field’s value as you can see in this screenshot.

 

clear br