How to Add SharePoint Document Files Tab to a Dynamics 365 Custom Table (Entity) Main Form


Microsoft Dynamics 365 Custom Table (Custom Entity) supports Document Management with SharePoint. The Main Form on the Custom Table (Custom Entity) however DOES NOT have the Files tab available by default.

The same setup also applies to adding the Files tab to Main Forms (if missing and not present by default) of out of the box Dynamics 365 tables (entities) that are enabled for Document Management.

Note: We will need to use the Microsoft Power Apps Form Designer to do this since the Dynamics 365 Legacy / Classic Solution Explorer DOES NOT have the option to setup the related Documents subgrid under the Files tab.

Here is how to add a SharePoint Document “Files” tab to a Document Management enabled Dynamics 365 Table (Entity).

Part 1 – Create the Files tab and add the Related Documents Subgrid

  • Open Power Apps > select the Dynamics 365 environment > open the Solution containing the custom entity main form to add the Files tab to

Note: For this example – we will use a custom table (entity) called “Company”

  • From the opened Solution > Open the custom entity > Open the Main Form to add the Files tab

Note: For this example – we will use the main form called “Information”

  • Add a 1 column tab and label it “Files” to the main form
  • Select this new tab and click to focus on the Section
  • Hide the Section label in this new “Files” tab
  • Add a Subgrid component to this new Files tab
  • Click on the “Show related records” and select the “Documents (Regarding) for Table
  • The Default view is defaulted to “All SharePoint Document” and NOT editable from Power Apps Form Designer at this time. We will set this to “Document Associated Grid” default view via Customization XML at a later step – see Part 2 below

Note: “Document Associated Grid” is the default view behavior found in out of the box Files tab and related Documents view

  • Check the “Hide label” option for the Subgrid control
  • Check the “Allow users to change view” option
  • Check the “Show all views” option
  • Save and Publish the change
  • The Files tab is now functional except that it defaults to the “All SharePoint Document” and will NOT display the Document Location on the upper left corner below the view name. If this is OK – you can stop here. However, if you like to set the default view to “Document Associated Grid” – proceed to the next step – Part 2 Modify the Customization XML

Part 2 – Modifying the Customization XML to set Files tab default view to “Document Associated Grid

Note: Need to be extra careful when editing the Customization XML since it will be via UNmanaged Solution – changes are final. Be sure to test it out in a test environment first.

  • Open Power Apps > select the Dynamics 365 environment > Create a NEW Solution to contain only the updated main form component from Part 1 above AND NOTHING ELSE
  • Add the custom Table to this NEW Solution from above
  • Click on Select components and ONLY select the Main Form component with the Files tab from above
  • DO NOT include all components
  • DO NOT include table metadata
  • Export this solution as Unmanaged solution

  • Update the customizations.xml from the downloaded Unmanaged solution zip file
  • Search for the Subgrid control label name in the customizations.xml. Example above is labeled “New SG control 1614755864750
  • Replace the <ViewId> value A5B008AC-07D9-4554-8509-2C05767BFF51 with 0016F9F3-41CC-4276-9D11-04308D15858D. THIS IS THE ONLY CHANGE
  • Import the Unmanaged solution zip file and publish
"All SharePoint Document" view GUID (replace this value in the UNManaged Solution's Customizaton XML):

<ViewId>{A5B008AC-07D9-4554-8509-2C05767BFF51}</ViewId>

TO THIS "Document Associated Grid" view GUID:
<ViewId>{0016F9F3-41CC-4276-9D11-04308D15858D}</ViewId>

This was tested on:
Microsoft Dynamics 365 2020 release wave 2 enabled
Server version: 9.2.21014.00140
Client version: 1.4.2204-2101.4

Contact me if you need some Microsoft Dynamics 365 CRM Sales Customer Engagement assistance.

Frank Lee
12 times awarded Microsoft MVP – Dynamics 365 / CRM
San Francisco Bay Area | Silicon Valley

Posted in Customization, Document Management, Dynamics 365, Power Apps, SharePoint Integration, Unified Interface | Tagged , , , , , , , , , , , , , , , | Leave a comment

How to Update an Existing Dynamics 365 Custom Report RDL


Dynamics 365 supports custom reports built using SQL Server Reporting Services (SSRS) report definition language (RDL). When the situation calls for updating an existing Microsoft Dynamics 365 custom report (.RDL) but you no longer have access to the original code/solution – here is how to download and update the existing Microsoft Dynamics 365 custom report (.RDL):

First, download the existing Custom Report’s .RDL file using Microsoft Dynamics 365’s Advanced Find.

Use Advanced Find to look for “Reports

Select the existing Dynamics 365 CRM Report and click on Edit. Action > Download Report

Next step is to open Visual Studio that is setup for Microsoft Dynamics 365 Report writing/development

Create a new project based on the “Report Server Project” template

Right click on the “Reports” folder and Add an “Existing Item…”. Select the downloaded .RDL file from above step

Open (double-click) on the .RDL file and begin updating custom report in the “Design” tab

Click on the “Preview” tab to build the updated .RDL file.

The updated .RDL file is located in the Project directory. Use Advanced Find to edit the existing custom report and choose the updated .RDL file.

Contact me if you need some Microsoft Dynamics 365 CRM Sales Customer Engagement assistance.

Frank Lee
12 times awarded Microsoft MVP – Dynamics 365 / CRM
San Francisco Bay Area | Silicon Valley

Posted in BIDS Report Authoring Extension, Customization, Dynamics 365, Report | Tagged , , , , | Leave a comment

Dynamics 365 Configure Server Based SharePoint Integration Error – 403 Forbidden


Encountered this error while setting up the Microsoft Dynamics 365/CRM SharePoint Document Management – when trying to Enable Server-Based SharePoint Integration: Validation Status: Failed. Default Site Invalid. Dynamics 365 Configure Server Based SharePoint Integration Error – The remote server returned an error: 403 Forbidden.

<errorlog><sites>
  <site>
    <url>https://demo210111.sharepoint.com/sites/CRMTS01</url>
    <exception>The remote server returned an error: (403) Forbidden.</exception>
  </site>
</sites></errorlog>

This is due to the CRM User setting up the SharePoint integration needing the proper SharePoint Site permission in-addition to CRM security roles. Need to add the CRM User to the SharePoint Site with Edit Permission to resolve this error.

Re-ran and it is OK and no more error. Yay!

Link to Permissions required for document management tasks

Contact me if you need some Microsoft Dynamics 365 CRM Sales Customer Engagement assistance.

Frank Lee
12 times awarded Microsoft MVP – Dynamics 365 / CRM
San Francisco Bay Area | Silicon Valley

Posted in Document Management, Dynamics 365, SharePoint Integration, Troubleshooting | Leave a comment

Dynamics 365 Document Location Error – urloption is not defined


Encountered this error while setting up the Microsoft Dynamics 365/CRM SharePoint Document Management – Document Location “urloption is not defined

Here is the Error Details

ReferenceError: urloption is not defined
    at Object.mscrm.Form_onload (https://demo210111.crm.dynamics.com/%7b637464136700026442%7d/webresources/SharePointDocumentLocation_main_system_library.js:1:1380)
    at pl._executeFunctionInternal (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:1142:3778)
    at pl.executeFunction (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:1142:3524)
    at pl.execute (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:1142:3339)
    at https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:110:21987
    at i (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:235:88)
    at z._executeIndividualEvent (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:110:21963)
    at z._executeEventHandler (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:110:19076)
    at Object.execute (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:110:16470)
    at w._executeSyncAction (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:765:692)

This error is due to Server-Based SharePoint Integration is NOT enabled. Usually this is the first step in setting up the out of the box D365 SharePoint integration. Only encountered this error while trying out a “test environment” and unable to find anything on the error message.

To enable the Server-Based SharePoint Integration navigate to Power Platform admin center > Select the Dynamics 365 Environment > Settings > Integration > Document management settings > Enable Server-Based SharePoint Integration

Contact me if you need some Microsoft Dynamics 365 CRM Sales Customer Engagement assistance.

Frank Lee
12 times awarded Microsoft MVP – Dynamics 365 / CRM
San Francisco Bay Area | Silicon Valley

Posted in Document Management, Dynamics 365, Microsoft Dynamics CRM, Troubleshooting | Leave a comment

Business Process Flow Does NOT Appear on Some Existing Records


Encountered an existing CRM Account record that does NOT display a Specific Business Process Flow (BPF) after selecting the BPF via the Switch Process in either Unified Interface or legacy web client.

Checked the below items but issue still presists

  • Check that the BPF is active – OK
  • Check that the User has Security Privilege to the BPF – OK
  • Check that the Unified Interface App has the BPF enabled – OK
  • Check creating a new CRM Account record shows BPF – OK
  • Check other existing CRM Account records show BPF – OK

So the BPF is still NOT showing…some more trouble-shooting is needed! The BPF architecture changed in Microsoft Dynamics 365 from earlier versions which introduced a new entity for each new BPF activated. This entity tracks among other things every instances of the related CRM records with the corresponding BPF.

Somehow there was an existing entry in this BPF entity for the affected Account record NOT displaying the BPF. This was an old CRM Account record and perhaps got corrupted during the upgrade process to Microsoft Dynamics 365.

Solution was to delete this record from the BPF entity.

After clearing this – able select the BPF for the Account record and the BPF displayed OK afterwards. Also a new corresponding entry was created in the BPF entity.

Contact me if you need some Microsoft Dynamics 365 CRM Sales Customer Engagement assistance.

Frank Lee
12 times awarded Microsoft MVP – Dynamics 365 / CRM
San Francisco Bay Area | Silicon Valley

Posted in Business Process Flow, Dynamics 365, Troubleshooting | Leave a comment

Dynamics 365 Unified Interface JavaScript to Set a Date Field to Current Date


From recent working with Dynamics 365 customers transitioning to the new Unified Interface – have a CRM Sales User scenario that needs to set a CRM Contact field to the current date on a new record.  The user can then either keep the default current date or set it to another value before saving the new record.

We will need to use JavaScript to set a CRM date field via the Unified Interface or the CRM legacy web client.  The Dynamics 365 Business Rule does not offer a “Current Date” function at this time.  Also Dynamics 365 Workflow or Microsoft Power Automate will not be suitable since it needs the CRM record to be saved in-order to trigger setting a default value (even CRM Workflow running in Real-Time would not work in this case).

So here is the JavaScript – working for both the Unified Interface and CRM legacy web client:

//————–

var Sdk = window.Sdk || {};
(function () {
    this.setFieldCurrentDate = function (executionContext) {
        var formContext = executionContext.getFormContext();
        if(formContext.ui.getFormType()==1) {   // 1 is for new record create state
            var currentDate = new Date();
            formContext.getAttribute(“birthdate”).setValue(currentDate);
        }
    }
}).call(Sdk);

//————–


To setup the above JavaScript:

Add the above JavaScript to a Web Resource

image

 

Add the above Web Resource to the CRM Contact Form Main Library and add “Sdk.setFieldCurrentDate” to the Form Onload event.  Be sure to check on the “Pass execution context as first parameter”.  Publish the CRM Contact entity.

 

image

 

image

 

On a New CRM Contact Record – the Contact’s Birthday field is defaulted to today’s date:

image

 


 

Contact me if you need some Microsoft Dynamics 365 CRM Sales Customer Engagement assistance.

Frank Lee
12 times awarded Microsoft MVP – Dynamics 365 / CRM
San Francisco Bay Area | Silicon Valley

Posted in Dynamics 365, JavaScript, Unified Interface | Tagged , , , | Leave a comment

How To Uptake the new Service scheduling in your org


The Dynamics 365 legacy service scheduling is deprecated and will no longer be available on 10/1/2020, use the new Dynamics 365 Service Scheduling available in the Unified Interface. 

I had encountered the following issue during the setup of the new Service Scheduling in one of my existing Dynamics 365 Online environments – “Uptake the new Service scheduling in your org.  You can now use the new Service scheduling experience in Unified interface and leverage the power of Resources, Facilities/Equipment, Service Activities, Schedule board and more”

image

Here is how to resolve this “Uptake” in my Dynamics 365 Online environment:

  • Go to Power Platform admin center > Environments > select the Dynamics 365 Online environment  > click on the “…” and click on “Manage Solutions

image

  • Select the “Core Service Scheduling” solution and click on the “INSTALL” to install this solution

image

By installing the “Core Service Scheduling” solution – two new solutions were added to my Dynamics 365 Online environment: Universal Resource Scheduling and Core Service Scheduling

image

image

 

Now I can start the setup and begin using the new Dynamics 365 scheduling experience.  The new schedule board looks very nice – a good upgrade from the legacy service calendar.

Posted in CRM Online, customer service hub, Dynamics 365, Service Scheduling, Unified Interface | Tagged , , | Leave a comment

How To Disable Unified Interface Only Setting in Dynamics 365


All current version Microsoft Dynamics 365 trials and environments are defaulted to the “Unified Interface Only” setting.  This is a good thing since Microsoft Dynamics 365 Unified Interface is here to stay and the previous “Legacy Web Client” interface is deprecated as of September 2019. 

image

For certain situations where we need to run “Legacy Web Client” such as for testing existing setups – how do we enable our “Legacy Web Client” interface?

Firstly – the setting “Use Unified Interface only” is no longer listed under the Dynamics 365 Client’s Advanced Settings >> Administration >> System Settings >> General area

image

So where did it go?

The “Use Unified Interface only” setting is now found in the Power Platform Admin center!

Here are the steps to navigate to this setting:

Open Power Platform Admin center >> click Environments >> select the Dynamics 365 environment >> click the Settings button >> click the Behavior setting >> disable or enable the “Use Unified Interface only” setting

image

image

image

 

 

Contact me if you need some Microsoft Dynamics 365 CRM Customer Engagement assistance.

Frank Lee
12 times awarded Microsoft MVP – Dynamics 365 / CRM
San Francisco Bay Area | Silicon Valley

Posted in Dynamics 365, Legacy Web Client, Power Platform, Unified Interface | Tagged , , , | Leave a comment

Microsoft Dynamics 365 v9.0 (on-premises) Downloads


Microsoft Dynamics 365 Server (no CAL limit) 90-day trial license keys:
KKNV2-4YYK8-D8HWD-GDRMW-29YTW

If you use a 90-day trial key, you can enter a valid commercial product key at any time during the trial period to continue to use the product.

Here is a list of the Dynamics 365 v9.0 (on-premises) Download URLs:

Dynamics 365 Server, version 9.0 (on-premises)
https://www.microsoft.com/en-us/download/details.aspx?id=57478

Microsoft Dynamics 365 On-Premise Cumulative Updates
https://support.microsoft.com/en-us/help/3142345/microsoft-dynamics-365-onpremise-cumulative-updates

Dynamics 365 for Outlook, version 9.0 (Outlook client)
https://www.microsoft.com/en-us/download/details.aspx?id=56972

Microsoft Dynamics for Outlook, version 9.0 Update 1.0
https://www.microsoft.com/en-us/download/details.aspx?id=58079

Dynamics 365, version 9.0 Email Router
https://www.microsoft.com/en-us/download/details.aspx?id=56974

Dynamics 365, version 9.0 Report Authoring Extension (with SQL Server Data Tools support)
https://www.microsoft.com/en-us/download/details.aspx?id=56973

Dynamics 365 for Customer Engagement, version 9.0 Language Packs
https://www.microsoft.com/en-us/download/details.aspx?id=56970

Dynamics 365 Customer Engagement (on-premises) version 9.x Software Development Kit (SDK)
https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/download-dynamics-365-sdk-v9

Microsoft Dynamics 365 Customer Engagement (on-premises) Help, version 9
https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/overview

PDF Link: Deploy and operate Dynamics 365 Customer Engagement (on-premises)

Administrator Guide for Dynamics 365 Customer Engagement (on-premises), version 9
https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/admin/overview

App making and customization overview for Dynamics 365 Customer Engagement (on-premises), version 9
https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/overview

Developer Guide for Dynamics 365 Customer Engagement (on-premises), version 9
https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/overview

Microsoft Learning Path for Customer Engagement

 

 

Microsoft Dynamics 365 Customer Engagement (on-premises) system requirements and required technologies

Supported web browsers and mobile devices

Microsoft Dynamics 365 for Outlook software requirements

 

Contact me if you need some Microsoft Dynamics 365 CRM Customer Engagement assistance.

Frank Lee
12 times awarded Microsoft MVP – Dynamics 365 / CRM
San Francisco Bay Area | Silicon Valley
Keeping up with the Cloud Innovations!

Posted in CRM On Premise, Dynamics 365, Language Pack MUI, Microsoft CRM Outlook Client, Outlook Client, Software Development Kit (SDK), Upgrade | Tagged , | Leave a comment

Advanced Find Before Today or Older Than Today


This is a very common user question since Microsoft CRM 1.0 – how to setup an Advanced Find view to display all the records filtered on a CRM entity’s date field (such as the Account’s Created On date) that is before today or older than today.  Dynamically and NOT hard coded the date via using the Advanced Find’s “ON or Before” date operator.

Since Microsoft Dynamics CRM 2016 (first available in Microsoft Dynamics CRM Online 2015 Update 1) – there are additional out of the box Advanced Find date operators such as Older Than X Minutes/Hours/Days/Weeks/Years…

This is wonderful – because by using the following two Advanced Find filter conditions on any entity’s date field will provide the list of all records Before Today or Older Than Today dynamically:

[Date Field] Older Than X Days = 1 OR [Date Field] Yesterday

image

We need the additional Yesterday filter because the Older Than X Days operator only accepts a value from 1 to 500 and doesn’t support 0.

image

Yay!  All out of the box.  No more need for XML hacking, external Excel transformation, custom reports, etc.

 

Contact me if you need some Microsoft Dynamics 365 CRM Customer Engagement assistance.

Frank Lee, Microsoft Business Solutions MVP Dynamics 365 CRM
San Francisco Bay Area Silicon Valley Napa
Workopia, Inc. – Microsoft CRM Keeping it Simple!

Posted in Advanced Find, CRM 2016, CRM On Premise, CRM Online, Dynamics 365, Microsoft CRM, Microsoft Dynamics CRM, MS CRM, Report | Tagged , , | Leave a comment