Tag Archives: Dynamics

Dynamics 365: Modern Advanced Find

I have been used to using Advanced find (now can be referred as Legacy Advanced find screen) since 2005 and this screen is/was pretty much back bone of dynamics system since first release of dynamics.

Legacy Advanced Find

Recently Microsoft have announced introducing Modern Advanced find for Model Driven App  which will pretty much replace existing advanced find screen.

To enable this feature, go to https://admin.powerplatform.microsoft.com/environments and select relevant environment and then go to feature and enable this feature as shown in screen print below.

Enable Modern Advanced Find

Creating new view

For creating new view, click on Data-verse Search box and click on “Search for rows in a table using Advanced filters” link

D365 Creating a New view

On next screen select relevant table.

This table list is limited to only the ones specified with in Model Driven App so this is major change as currently in legacy Advanced find screen user can search on any tables they can access based on their Permission.

select Table for View

Once selected relevant Table and then on next screen Create relevant filter and click on Apply  

View Filter

After this, click on Save as new view and on next screen give relevant view name for this.

Saving New View

After clicking on Save, new Personnel view will be created against this table.

Amend Existing view

To amend existing personnel view, select relevant view and select Edit Columns (to Add/ Remove columns) or Edit Filter (to change view criteria)

Amend Existing View

Delete/Hide or Change View Name

Click on “Manage and share views” link which will allow user to Edit view name, user can hide and delete not requirement view as well from this screen.

Delete/Hide View

This allows configure sorting of views as well.

If as an Administrator if you want to apply this settings for multiple user then use XRMToolbox Plug-in called “User Views Display Settings” for this (refer screen print below)

XrmToolBox

Note: –

Even though after enabling Modern Advanced Find, Legacy Advanced Find icon is not longer visible but if some user still wants to access, they can access via following URL. (Replace CRMURL and APPID for your relevant environment)

XrmToolBox: AutoNumberUpdater : New Tool

Recently we had a scenario where we had to create an auto number field on an existing table (or entity) in data verse.

so when you create a new auto number field all existing records will have this field value as Null and will not be populated.

To resolve this issue, I have created the following new XrmToolBox Tool called “AutoNumberUpdater”.

To Install this toll, open XrmToolBox Tool Library and selected “AutoNumberUpdater” and then press Install

XrmToolBox: Tool Library

Once installed, open this tool and connect to the relevant data version environment.

Following are brief steps on how to use this tool.

XrmToolBox : AutoNumberUpdater

Step 1: Select Solution from the solution dropdown

Step 2: After Solution is selected, the system will show you all entities which are in the currently selected solution so pick the relevant entity (or table) where the auto number column resides.

Step 3: Once Entity is selected, it will populate all available auto number attributes (or fields) in the attribute dropdown list. Selected relevant attributes for which data needs to be populated.

Step 4: once attribute is selected, system will show auto number format in Next number field and also enabled “Fix Auto Numbers” Button

Step 5:  Once you are ready to update data, press “Fix Auto Numbers” Button which will show a running log of records as shown in screen prints below.

XrmToolBox : AutoNumberUpdater : Running Log

I hope this helps…

Notes: –

  1. This is tool inspired from already existing tool called Auto Number Managed by Jonas Rapp (https://jonasr.app/) which allow you to create new auto number field on dynamics 365 (or data-verse) table
  2. If you want to learn more about data verse auto number then refer this article https://docs.microsoft.com/en-us/powerapps/maker/data-platform/autonumber-fields

Dynamics 365: Setting up Owner look up to display only teams related to logged on user

Dynamics: Setting up Owner to display only teams related to logged on user

By default, dynamics model driven app Form owner field displays all users and teams and this post we will write JavaScript code for specific entity (table) to ensure users can only pick teams (where current logged on user is a member of the team)

Step 1: Firstly, there is already existing view called “My Owner Teams”, which displays all teams related to logged on user, so we will do advanced find for this view and find id of this view which will be using in next step.

select view which needs to be set as default view

After creating this view download FetchXML and note down view id for this, if you have specific requirement then create new public view and use that record id in next step.

Step 2:  Now we will create new web resource which will filter our owner field on model driven table form to only display teams which are related to logged on user.

For this we will create new java script web resource as shown in screen print below.

new web resource

And following is code that we will put in this JavaScript file.

The source code file for above code is located at https://github.com/contactmayankp/miscellaneousscripts

Step 3: Add form load event on model driven form.

Add this web resource as library in the form

And then configure onload event as shown in screen print below.

After doing this configuration, save and publish form changes..

Step 4: Ensure relevant team got correct security role and permission assigned other wise user might see following error message.

The selected team does not have sufficient privileges for this action. Assign a security role with the required privileges to this team, and then try again.

Step 5: Finally, after doing all above changes verify the changes working as expected …

Hope this helps…

Enabling Custom Entity for BPF (Business Process Flow) in Power Platform/Data Verse/Dynamics 365 online

I wanted to create new Entity in Dynamics online Model Driven App, so I create new table using new interface but looks like there is no option for table to enabled for Business process flow there…

Following are all the options available in new interface and enabling business process flow is not available in list for new interface.

PowerApps Creating New Table options

For the time being, I switched to Classic interface and enabled Business process flow for my custom entity.

Switching to Classic Interface
Classic interface has this option enable, Save and publish changes

I guess MS will be including this option in new interface at some point in future!

CRM 2011 Workflow Entity View records are not sorted alphabetically

I just recently come across customer reported CRM issue related workflow view displaying on demand workflow list random manner and not displaying them in alphabetically manner.

This issue mainly hits you if you got lots of workflow related to particular entity and while trying to run specific on demand workflow you will see lots of workflow in view and needs to manually sort the list to find your workflow.

B6510

Well looking at issue it seemed really easy issue to fix, so just open relevant view and apply sort on name column and publish the changes BUT this view is called “On Demand Workflows” is not customizable and hence we have to do unsupported change to fix this issue. Following steps done to fix this issue using unsupported manner.

Step 1: first find existing view and view definition from the data base. So run following query for this.

select savedqueryid,name,fetchxml from savedquerybase where name like '%On Demand Workflows%' order by name

Please note down savedqueryid as we will be using this in next steps.

B65112

Step 2: So following is the Original FetchXML definition for this view. As can be seen there is default sort order is not defined in this definition.

<fetch version="1.0" mapping="logical"><entity name="workflow"><attribute name="workflowid" /><attribute name="name" /><attribute name="createdon" /><attribute name="modifiedon" /><attribute name="statecode" /><attribute name="owningbusinessunit" /><attribute name="ownerid" /><filter type="and"><condition attribute="type" operator="eq" value="1" /><condition attribute="ondemand" operator="eq" value="true" /><condition attribute="statecode" operator="eq" value="1" /><condition attribute="category" operator="eq" value="0" /></filter></entity></fetch>

We will be Modifying above fetch xml with following to include sort order related to this. We refer highlighted change in fetchxml below for this.

<fetch version="1.0" mapping="logical"><entity name="workflow"><attribute name="workflowid" /><attribute name="name" /><attribute name="createdon" /><attribute name="modifiedon" /><attribute name="statecode" /><attribute name="owningbusinessunit" /><attribute name="ownerid" /><order attribute="name" descending="false" /><filter type="and"><condition attribute="type" operator="eq" value="1" /><condition attribute="ondemand" operator="eq" value="true" /><condition attribute="statecode" operator="eq" value="1" /><condition attribute="category" operator="eq" value="0" /></filter></entity></fetch>

Step 3: now update this specific view definition using SQL query against CRM database, please replace the SAVEDQUERYID with value noted down in step 1.

update savedquerybase
Set fetchxml ='<fetch version="1.0" mapping="logical"><entity name="workflow"><attribute name="workflowid" /><attribute name="name" /><attribute name="createdon" /><attribute name="modifiedon" /><attribute name="statecode" /><attribute name="owningbusinessunit" /><attribute name="ownerid" /><order attribute="name" descending="false" /><filter type="and"><condition attribute="type" operator="eq" value="1" /><condition attribute="ondemand" operator="eq" value="true" /><condition attribute="statecode" operator="eq" value="1" /><condition attribute="category" operator="eq" value="0" /></filter></entity></fetch>'
where name = 'On Demand Workflows'
and savedqueryid = 'SAVEDQUERYID';

After applying above changes log in to CRM and verify this view is displayed record correctly now.

B65113

****Important Notes regarding above change****
above change is unsupported so make sure you apply this change to Dev, Test environment before applying this to Live environment. Also make sure you take back up of database before doing this
change.

Hope this helps…

Cheers,
MayankP:)

Dynamics CRM 2011 update

As you aware CRM dynamics 2011 beta was released in September 2010, now following is link to register for global launch of Dynamics CRM 2011 on 20th January 2011.

http://crm.dynamics.com/2011launch/

Also Dynamics CRM 2011 Release Candidate (RC) is now available for download in the Microsoft Download Centre. Following is details for the same from Dynamics CRM Team Blog.

Microsoft Dynamics CRM 2011 Server Release Candidate

http://www.microsoft.com/downloads/details.aspx?FamilyID=c3f82c6f-c123-4e80-b9b2-ee422a16b91d
Available in English only

Microsoft Dynamics CRM 2011 for Microsoft Office Outlook
http://www.microsoft.com/downloads/details.aspx?FamilyID=22dc423a-7194-491e-a169-6ace16bfdd36
Available in 25 languages

Microsoft Dynamics CRM 2011 Language Pack
http://www.microsoft.com/downloads/details.aspx?FamilyID=db44c564-2338-407e-980a-c9c83ad37729Available in 41 languages

Microsoft Dynamics CRM 2011 E-mail Router
http://www.microsoft.com/downloads/details.aspx?FamilyID=a995f6ad-0099-42fd-9b22-cf7b3d40a2bf
Available in 25 languages

Microsoft Dynamics CRM 2011 Report Authoring Extension
http://www.microsoft.com/downloads/details.aspx?FamilyID=64a09b75-8376-4b9d-aea3-8a83a1837c4d
Available in 25 languages

Microsoft Dynamics CRM 2011 List Component for Microsoft SharePoint Server 2010
http://www.microsoft.com/downloads/details.aspx?FamilyID=23c0f351-8694-4d92-9ddf-34a949aec6a7
Available in 41 languages

Cheers,
MayankP:)

Dynamics CRM 2011 Presentations

I have just come across really nice slide show presentation of CRM 2011 which is shared by Jukka Niiranen and thought of sharing with the community.

Following is link to two part presentation for the same.

Part 1

http://www.slideshare.net/jukkan/crm2011-walkthrough-part1

Part 2

http://www.slideshare.net/jukkan/microsoft-dynamics-crm-2011-walkthrough-part-2

Happy CRMing 🙂

Cheers,
MayankP

CRM Mail Merge Letter Printing Issues

Today we came across interesting problem regarding mail merge letter with regards to Dynamics CRM.

We were generating customer letter from Dynamics CRM Mail merge.

Our letter was four page letter and we had mail merge template setup and letter generated fine.

But while printing we wanted to print first page of company letter pad and other one on normal page. Well if you just print the mail merge generated letters then it consider the entire letter as one document and print them in just one print job.

So we used to get only first page of first letter on company letter page while others are printing normally which is not correct…

Well after much investigation (or should I say trial and error method) we found the solution and following steps to achieve the same..

1. Open Relevant word Document or Letter
2. Alt + F11 to open the Visual Basic Editor.
3. Module -> Insert Module
4. Copy following code and past in there…

Option Explicit
Sub PrintSectionsToSubDoc()
Dim i As Long
For i = 1 To ActiveDocument.Sections.Count
ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i
Next i
End Sub

5. Close the Visual Basic Editor

6. Go to View -> Macros (or Tool-> Macro -> Macros for Office 2K3 ) and double click PrintSectionsToSubDoc()

Cheers,
Mayank 🙂

CRM 4.0 Security Privileges

Recently we started getting following error on one of our CRM environment.

Server was unable to process request.
0x80040220
SecLib::CrmCheckPrivilege failed. Returned hr = -2147220960 on UserId: 6e7d3c02-b2c2-df11-a8e6-78e7d1e8d0ae and PrivilegeId: cb4b339f-2b45-447e-bdd3-0bf4bbebc294
Platform

Well this does say it security issue but still does not say which entity it is failing for..Well you can easily track this down using following query. (I.e. replace relevant privilege id as per your requirement)

select name from FilteredPrivilege
where privilegeid = 'cb4b339f-2b45-447e-bdd3-0bf4bbebc294'

As in example it shows user does not have permission to update relevant leads, we given lead update permission to relevant users and that fixed the issue!!

While looking for solution on this problem I also found few CRM Security Reports displaying all role privileges, including hidden privileges.

Cheers,
MayankP:)