Featured Post

Dynamics 365 - Business Process Flow and Things to take note before you upgrade into Dynamics 365.

In 2 months ago, my company decided to upgrade the Dynamics CRM 2016 into Dynamics 365 and there is something different about Dynamics 365 B...

Thursday, November 16, 2017

Dynamics 365 : Access Team in SQL

Few months ago, my team and I implemented a plugin,  based on certain conditions, the plugin will add or remove users from access team.

Today, we've found out the plugin was not working properly after upgraded to Dynamics 365. Thus , we have to fix it. 

We decided to retrieve all the affected records and access team members but it is not easily to retrieve the records through advanced find. So, we have to write the sql query to generate the list.

DEMO






SELECT     o.Name , t.Name AS TeamName, u.FirstName, u.LastName, tt.TeamTemplateName
FROM       filteredopportunity AS o INNER JOIN
PrincipalObjectAccess AS poa ON o.opportunityid = poa.ObjectId INNER JOIN
TeamBase AS t ON poa.PrincipalId = t.TeamId INNER JOIN
TeamMembership AS tm ON t.TeamId = tm.TeamId INNER JOIN
SystemUser AS u ON tm.SystemUserId = u.SystemUserId INNER JOIN
TeamTemplate AS tt ON t.TeamTemplateId = tt.TeamTemplateId
WHERE     (o.name = 'test 1') 


I hope this will save you some time and Happy CRM-ing.

Wednesday, November 15, 2017

Dynamics 365 - Session Time Out

I've been asked by some of my clients in few years ago, why CRM doesn't have the ability to configure the session time out . I have no idea how to answer them, but with the latest version of Dynamics 365, you are now able to have session timeout feature.

Why now ?


  • Because in previous version of Dynamics 365, the session timeout for a user is configured to 24 hours. Technically, does not meet the expectations for company which has strict policies.
  • To have better security.


Where is session timeout setting?


  • Setting > Administration > System Settings > General Tab







Tuesday, November 14, 2017

Dynamics 365 - MultiSelect Option Set

Finally, one of the most asked for feature is released : "Multi Select Option Set", a new attribute type in Dynamics 365 V9.0.

Where is it ? 

1. Under the data type, you can see a new option called "MultiSelect Option Set",


How does it looks like in Form?




Auto-Complete feature is available, you can use text to search for the value you want.



How does it looks like after selected the value(s).


How does it looks like in Advanced Find ?

In View


Something you need know


  •  Auto-Complete is available. 
  •  Multi Select Option Set can hold up max to 150 values.
  •  Can be used in Advanced Find and Fetch Xml Queries .
  •  Select All and Clear selection feature.

  •  Can leverage existing global option set.



How do we import using Excel Sheet?

  • enter the values as semicolon separated.




Now let's import into CRM.


I hope this will help you to understand about Multi Select Option Set and Happy CRM-ing.

Monday, November 13, 2017

Dynamics 365 - Unable to find Active Directory object for SID?

Few months ago, my company decided to change the domain .

We've built a Console application to do the necessary changes. Unfortunately, we hit 1 error while trying to change the domain. The system throw us an error " Unable to find Active Directory object for SID".


Root Caused

- Duplicate replication of the same user in more than one domain controllers.

- This problem creates an object in foreign security principals container with a prefix as 'CNF' for the object guid.

Solution

- using the user SID and find the duplicate object in foreign security principals container and delete it.



I hope this will save you some time and Happy CRM-ing.

Saturday, November 11, 2017

Dynamics 365 - Site Map Editor


Before Dynamics 365, how do you edit the sitemap?

I believe most of the developers are either editing the xml file or \using a very powerful tool called XRM Tool Box.

But with Dynamics 365, you are able to edit the site map using the editor within CRM. Does it sounds great? Let's us get into it so you know how to use it.

DEMO

1. Create a solution, name it whatever name you want but be meaningful.



2. Let's go into the solution, click on Client Extensions > Add Existing > Site Map



  • Do not forget to download a backup, just in case you have to revert back to original design.
3. Double click the Site Map, and you will see the Site Map editor open up.



4.  You can edit for privilege, Title, Description and other setting as well.






5. After you completed the configuration, Click on Save then Publish.



6. Result






I hope you learn how to use the Site Map editor and Happy CRM-ing.

Friday, November 10, 2017

Dynamics 365 - Thinking to trigger a workflow when switching a Business Process Flow? You better think twice :)

Before Dynamics 365, we can easily create a workflow and trigger it when user is switching a process by follow the below setting.


But With Dynamics 365, the behavior is very different from previous version.

Before we start the demo, i suggest you to read this article so that you have better understanding about the new BPF structure in Dynamics 365.

DEMO 

1. I will create an opportunity record.



2. Let's switch into another process




  •     The Modified on get updated.





  •     From the Audit History, Process ID, Stage ID and Traversed Path are working perfectly.



3. After few minutes, Let's switch back to first BPF.


 

  •     From the picture below, do you notice anything?




  •     Yes, no fields get updated anymore.   
  •     Even the BPF record stays where you created them.



DEMO 2

1. Now, i created 2 workflows and applied them into BPF.
   


2. Let's create an opportunity record.

  •     the description is updated.


2. Let's switch the process

  •   The description get updated too.



3. Let's switch back to first process
  • the description no longer get updated.



So, from the 2 demos above, do you realize anything?

  • once process is applied,
           - it will not trigger the workflow anymore.
           - it will not update the process id ,stage id and traversed path on entities anymore.
Conclusion
  • You should stop using Process id, Stage id and Traversed path on entities  because these fields will be deprecated soon.
  • You can refer the MSDN Article here.
I hope this will get you alert about this behavior and Happy CRM-ing

Thursday, November 9, 2017

Dynamics CRM 2013 - How to show and pass parameter into custom page on top of crm.


  1.      Create a Web Resources (HTML) in CRM



















2.         Putting the html Code into Web resources.  


 3.       In CRM 2011, we will create a function name inside html, but in CRM2013 if function is created, the script will not run, kindly remove the functions and directly put the code inside the html.



4.        Export and Extract the Sitemap Solution.Right Click the Customization XML File and Open it with Visual Studio (recommended).














5.        Putting the below code into the file.
          







.     6.     Save it and Add to Achieve (ZIP format only).
      
      7.     A New Navigation will be added into SiteMap.
             






      8.     Click the Navigation Link and See the Result.














Dynamics 365 - Using Save As to clone the Business Process Flow. Here is something you need to know

As a developer,  we need find a faster way to complete a task as soon as we can because sometime the timeline is really really tight.

But here is something you need to know, if you are going to use the Save As to clone a Business Process Flow (BPF).

Before we start the demo, i suggest you to read this article so that you have better understanding about the new BPF structure in Dynamics 365.

DEMO

1. Now let's clone a BPF by clicking on "Save As" button.




2. This is the result you are going to see.

   


3. I will continue the configuration by adding some fields or remove fields from the stages and click on Save and Activate.  How about the BPF name? It is okay , we can change it later.


4. After BPF is activated and from the picture below, do you notice something weird?

   
  •  Yes, the Display Name and Plural Name are grayed out. 
  •  It seems that BPF entity is different than other entities.


Solution

1. Create a solution and Add the particular entity into solution.


2. Export the Translation within the solution.


3. Extract the zip file and open up the Translations.xml.



4. Change the Display Name to the name you wanted and save the file.

5. Zip the [Content_Types].xml and CrmTranslations.xml.


  
6. Import the file by clicking on "Import Translations".


7. Click on Publish All Customization.

8. Refresh the form.

9. The name has been changed into Correct Name.


How do we prevent it ?

1. After click on "Save As" button in BPF.

2. Once the cloned BPF is generated, you can change the name anytime but make sure you do it before you activate the BPF.

Explanation 

This is because before the first activation of BPF, actually the BPF entity is not created yet . 


The BPF entity will be created after you clicked on "Activate" button.

Result after you clicked on Activate button


Lesson Learned

- Always change the name after you cloned the BPF so you don't get into trouble later.



I hope this will help you understand the behavior and save some time. Happy CRM-ing.