Microsoft Dynamics 365 Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/tag/microsoft-dynamics-365/ Microsoft Dynamics CRM . Microsoft Power Platform Sat, 27 May 2023 06:57:48 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/cropped-Microsoftdynamics365-blogs.png?fit=32%2C32 Microsoft Dynamics 365 Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/tag/microsoft-dynamics-365/ 32 32 176351444 Enable Queue or lead entity in TO or Form Field of Email of Sales up and customer service Hub – lead entity is not visible under email TO and From Field http://microsoftdynamics.in/2020/09/29/enable-queue-or-lead-entity-in-to-or-form-field-of-email-of-sales-up-and-customer-service-hub-lead-entity-is-not-visible-under-email-to-and-from-field/ Tue, 29 Sep 2020 14:41:16 +0000 http://microsoftdynamics.in/?p=4188 As we can see in the above screenshot when we open an email from Sales Hub it doesn't search for Queue record in TO or FROM fields and the same way if we open an email from Customer Service Hub it won't search  Lead record.

As we know in Legacy Web client there was no setting available to include or exclude them except Javascript so it took us some time to accept there might be some configuration or setting we might be missing. and with some research, my college provided the information providing below community query and it was helpful. thanks to Clofly Mao

https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/361316/how-to-enable-the-email-from-field-to-include-queues-as-a-selection

So we can follow the below steps to add or remove entities from Model-Driven apps to show or hide them from Email entity but remember these are not only limited to Emails, if you remove any entity it will be removed from whole model-driven app.

Go to
https://dvmske.crm8.dynamics.com/main.aspx?forceUCI=0&pagetype=apps
and open app designer or best practice is to create a solution add your model-driven app to it and then edit the same.

The post Enable Queue or lead entity in TO or Form Field of Email of Sales up and customer service Hub – lead entity is not visible under email TO and From Field appeared first on Microsoft Dynamics 365 Blog.

]]>

At First Glance, this looks like some kind of bug that in Customer service hub To field Contain different entity from Sales Hub as in the Legacy Web Client there was no option to configure TO or FROM field Entities without JS.

But in UCI you can add or remove the entity from TO or FROM "Party field" of Email but sacrificing howl entity from the HUB.

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/09/entity-missing-from-email-party-fields.png?fit=1931%2C1165

As we can see in the above screenshot when we open an email from Sales Hub it doesn’t search for Queue record in TO or FROM fields and the same way if we open an email from Customer Service Hub it won’t search  Lead record.

As we know in Legacy Web client there was no setting available to include or exclude them except Javascript so it took us some time to accept there might be some configuration or setting we might be missing. and with some research, my college provided the information providing below community query and it was helpful. thanks to Clofly Mao

https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/361316/how-to-enable-the-email-from-field-to-include-queues-as-a-selection

So we can follow the below steps to add or remove entities from Model-Driven apps to show or hide them from Email entity but remember these are not only limited to Emails, if you remove any entity it will be removed from whole model-driven app.

  1. Go to
    https://dvmske.crm8.dynamics.com/main.aspx?forceUCI=0&pagetype=apps
    and open app designer or best practice is to create a solution add your model-driven app to it and then edit the same.

  2. Click on Entities which will open up a list of entities checked means added to the app

  3.  Search for the entity missing

  4. Check the entity and then scroll from Entity View to add forms or view to be available on the hub

  5. Save and Publish

Same Way we can add lead fro the Customer Service hub and now Both entities will be visible in TO fields of the email.

The post Enable Queue or lead entity in TO or Form Field of Email of Sales up and customer service Hub – lead entity is not visible under email TO and From Field appeared first on Microsoft Dynamics 365 Blog.

]]>
4188
UCI How Dynamic URL work in UCI with some additional application mode parameters http://microsoftdynamics.in/2020/09/29/uci-how-dynamic-url-work-in-uci-with-some-additional-application-mode-parameters/ Mon, 28 Sep 2020 23:49:18 +0000 http://microsoftdynamics.in/?p=4179 Explaining Unified client interface URL Parameter and how it dynamically change the value while navigating to different pages

Table of Contents:

00:00 - Introduction
00:29 - UCI Dynamics URL parameters
01:32 - Unified client Interface URL Explained
03:16 - Cmdbr or command bar
03:54 - NavBar or Navigation Bar
04:23 - Create a power automate the flow
06:39 - Get Environment URL in Power automate
08:19 - Create Dynamics Record URL in ms Flow
10:31 - Add dynamics URL in Email

The post UCI How Dynamic URL work in UCI with some additional application mode parameters appeared first on Microsoft Dynamics 365 Blog.

]]>

Explaining Unified client interface URL Parameter and how it dynamically change the value while navigating to different pages

Table of Contents:

00:00 – Introduction
00:29 – UCI Dynamics URL parameters
01:32 – Unified client Interface URL Explained
03:16 – Cmdbr or command bar
03:54 – NavBar or Navigation Bar
04:23 – Create a power automate the flow
06:39 – Get Environment URL in Power automate
08:19 – Create Dynamics Record URL in ms Flow
10:31 – Add dynamics URL in Email

One of the Interesting thing in UCI is the way URL changes while navigating between pages examples

If we navigate to Entity form PageType = Entity , ent=logicallname , ID = guid

If we Navigate to Entity List PageType =EntityList , ViewID =GUID

If we navigate to Dashboard PageType = Dashboard with ID

As per the above image, the URL contains 3 parts

  1. URL of Environment: when we talk about the dynamic Record URL it should also consider when we move from UATto production we should not change it in the Production manual it should automatically take the URL of Environment.DVMSKEUAT.CRM.Dynamics.com to DVMSKEPROD.CRM.Dynamics.com
  2. App ID: Each App has it unique Id if you want that Entity to open in a specific App we need to Define it in the URLappid = GUID
  3. CMD Bar: CRM Bar is the bar where we navigate throw cmd buttons. We can remove/add-in from window by putting cmdbar= false/true

  4. NavBar: This is the Blue bar of CRM where we navigate app and entity history, We can Remove/add in form window by setting navbar=on/off

  • PageType: it is used to define type of page , Example pagetype=dashboard , pagetype=entitylist , pagetype=entity  E.T.C

  • ENT: ent stands for Entity where we define the name of entity example account, contact, incident in our case
  • ID: this defines GUID unique id of the page type or entity we want to retrieve data for example if we  using pagetype= Dashboard it will need GUID of Dashboard

Thank you.

The post UCI How Dynamic URL work in UCI with some additional application mode parameters appeared first on Microsoft Dynamics 365 Blog.

]]>
4179
Migration to UCI : Ribbon button not visible / Hidden , Debug Entity Ribbon application command bar using command checker http://microsoftdynamics.in/2020/09/18/migration-to-uci-ribbon-button-not-visible-hidden-debug-entity-ribbon-application-command-bar-using-command-checker/ Fri, 18 Sep 2020 16:37:11 +0000 http://microsoftdynamics.in/?p=4167 There is a new command available in UCI to help us troubleshoot the ribbon, It will show Button Properties, Command Properties like Action, Enable Rule, Display rule, and the best part is we don't have to install any tool or enable anything.

We just need to add these parameters in the entity "&flags=FCB.CommandChecker=true&ribbondebug=true"

It can be an entity

https://dvmske.crm8.dynamics.com/main.aspx?appid=68968382-8ff4-ea11-a815-000d3a3dfcae&forceUCI=1&pagetype=entitylist&etn=account&viewid=00000000-0000-0000-00aa-000010001001&viewType=1039&flags=FCB.CommandChecker=true&ribbondebug=true

It can be a form

https://yourOrg.crm8.dynamics.com/main.aspx?appid=68968382-8ff4-ea11-a815-000d3a3dfcae&forceUCI=1&pagetype=entityrecord&etn=account&id=aaa19cdd-88df-e311-b8e5-6c3be5a8b200&flags=FCB.CommandChecker=true&ribbondebug=true

It can be Sub Grid 

The post Migration to UCI : Ribbon button not visible / Hidden , Debug Entity Ribbon application command bar using command checker appeared first on Microsoft Dynamics 365 Blog.

]]>
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/09/debug-ribbon-button-mscrm.png?fit=2550%2C1384

While the transition to new UCI, We might have seen a few ribbons (OOB or custom) would not be visible in UCI and we checked every enable disable rule nothing looks wrong, and in legacy, its working fine, In this post we will check how we can debug each button i.e which display , enable rule or action failing on a button

There is a new command available in UCI to help us troubleshoot the ribbon, It will show Button Properties, Command Properties like Action, Enable Rule, Display rule, and the best part is we don’t have to install any tool or enable anything.

We just need to add these parameters in the entity “&flags=FCB.CommandChecker=true&ribbondebug=true”

  • It can be an entity

    https://dvmske.crm8.dynamics.com/main.aspx?appid=68968382-8ff4-ea11-a815-000d3a3dfcae&forceUCI=1&pagetype=entitylist&etn=account&viewid=00000000-0000-0000-00aa-000010001001&viewType=1039&flags=FCB.CommandChecker=true&ribbondebug=true
    
    

  • It can be a form

    https://yourOrg.crm8.dynamics.com/main.aspx?appid=68968382-8ff4-ea11-a815-000d3a3dfcae&forceUCI=1&pagetype=entityrecord&etn=account&id=aaa19cdd-88df-e311-b8e5-6c3be5a8b200&flags=FCB.CommandChecker=true&ribbondebug=true
    
    

  • It can be Sub Grid

 

When we click on Command Checker

  • It Gives us all Buttons available in Command Bar with property Hidden with name

  • Clicking on Button, it will elaborate more on Button Property and  Command Property, Example in below we are checking why Activate button is hidden, and in Command Properties, we can see display rule resulted in false and we can check which condition failed

This is much helpful in this time where most of us are transitioning from legacy to UCI and get many buttons which are hard to identify why they are not visible in UCI but same in visible in legacy WebClient. Thanks

The post Migration to UCI : Ribbon button not visible / Hidden , Debug Entity Ribbon application command bar using command checker appeared first on Microsoft Dynamics 365 Blog.

]]>
4167
Call Power Automate Flow from JavaScript from CRM || Execute Power Automate Flow from JavaScript and Get Response back in CRM Form, On-demand Power Automate flow from button http://microsoftdynamics.in/2020/08/23/execute-power-automate-flow-from-javascript-and-get-response-back-in-crm-form-on-demand-power-automate-flow-from-button/ Sun, 23 Aug 2020 14:53:28 +0000 http://microsoftdynamics.in/?p=4095 Call Power Automate Flow from JavaScript from CRM

1. "Execute Flow button" is Clicked from CRM
2. JS will execute Power Automate Flow using XMLHttpRequest
3.. Power Automate is Configured to send Response with Status 200 if condition fail or successful.
4. Js receives the Response and shows message as alert.

and all these activities will happen real-time

The post Call Power Automate Flow from JavaScript from CRM || Execute Power Automate Flow from JavaScript and Get Response back in CRM Form, On-demand Power Automate flow from button appeared first on Microsoft Dynamics 365 Blog.

]]>

Scenario is

1. "Execute Flow button" is Clicked from CRM
2. JS will execute Power Automate Flow using XMLHttpRequest
3.. Power Automate is Configured to send Response with Status 200 if condition fail or successful.
4. Js receives the Response and shows message as alert.

and all these activities will happen realtime

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/08/ondemand-PowerAutomate-flow-using-javascript-ribboon-button-dvmske.png?fit=1195%2C802

The post is Divided into 2 Parts

  1. Executing PowerAutomate Flow from Button using javascript
  2. Configuring response action in Power automate and Capturing response message in CRM using javascript

Step1 : Executing PowerAutomate Flow from Button using javascript

We will action “When an Http Request is received ” and follow below steps

  1. Create Power automate Flow to receive HTTPS Request from Javascript and send Email
  2. Register Javascript
  3. Creating a Ribbon Button on Contact Entity and add javascript action to the button Command and pass PrimaryControl

As in our previous post we already mentions steps to register and use it in Javascript

Click Here : http://microsoftdynamics.in/2020/07/11/execute-microsoft-power-automate-from-ribbon-using-javascript-on-demand-power-automate-flow-using-javascript-in-uci-replace-ribbonaction-js/

Below code open request to execute power automate flow, Next step is to see how we can get Response message in JS

function readXML(executionContext) {   
var formContext = executionContext.getFormContext();
    var flowUrl = "Http Post URL";
    var input = JSON.stringify({
        "contactid": formContext .data.entity.getId().replace("{", "").replace("}", "")
    });
    var req = new XMLHttpRequest();
    req.open("POST", flowUrl, true);
    req.setRequestHeader('Content-Type', 'application/json');
    req.send(input);
}

Step2 : Add response Action in Power Automate Flow

In Step1, we had executed XMLHttpRequest and have not written code to get a response in JS, In this step we will add custom response message which we will get in Javascript .

  1. Adding action “when a HTTP request is received”, setup payload
  2. Adding Condition “1 = 1”
  3. Adding Response action with Status = 200 and Body with Message “Yes Condition”

Step3 : Get Response in Javascript

We have requested XMLHttpRequest to Execute Flow, Adding custom response msg in Power Automate,

Now we will use blow code to get response with status 200 in CRM

function readXML(executionContext) {   
var formContext = executionContext.getFormContext();
    var flowUrl = "Http Post URL";
    var input = JSON.stringify({
        "contactid": formContext .data.entity.getId().replace("{", "").replace("}", "")
    });
    var req = new XMLHttpRequest();
    req.open("POST", flowUrl, true);
    req.setRequestHeader('Content-Type', 'application/json');

////Response
req.onreadystatechange = function () {
        if (this.readyState === 4) { 
            req.onreadystatechange = null;
            if (this.status === 200) {
                var result = this.response; 
                alert("" + result); 
            }
            else if(this.status === 400){
                alert(this.statusText);
  var result = this.response; 
                alert("Error" + result);
            }
        }
    };  

////End
    req.send(input);
}

We can write the code to get request and get response Asynchronous or Synchronous Thanks

The post Call Power Automate Flow from JavaScript from CRM || Execute Power Automate Flow from JavaScript and Get Response back in CRM Form, On-demand Power Automate flow from button appeared first on Microsoft Dynamics 365 Blog.

]]>
4095
Error : getFormContext is not a function in UCI , Ribbon Button http://microsoftdynamics.in/2020/08/22/error-getformcontext-is-not-a-function-in-uci-ribbon-button/ Sat, 22 Aug 2020 13:26:24 +0000 http://microsoftdynamics.in/?p=4089 The post Error : getFormContext is not a function in UCI , Ribbon Button appeared first on Microsoft Dynamics 365 Blog.

]]>

When passing primaryControl in Ribbon WorkBench we use it as executionContext and then get FormContext out of it.

But when same thing is done on UCI we get the Error getFormContext is not a function

We got this error in UCI and not in Legacy WebClient,

  1. We were Passing CRM Parameter PrimaryControl to Button in Ribbon workbench

  2. In JS we were getting FormContext from primaryControl(Executioncontext) which was working fine in the Legacy app

    function readXML(primaryControl) {   
    var formContext  = null;
     if (primaryControl!== null) { 
                formContext = primaryControl.getFormContext(); 
             }
        }
    }
  3. But when same is called in UCI we get ” ” Script Error, Because here we need to treat primary control as formContext

So final change needed in Code is as below

function readXML(primaryControl) {   
var formContext  = null;
 if (primaryControl!== null) {
         if (typeof primaryControl.getAttribute === 'function') {
             formContext = primaryControl; //called from the ribbon.
         } else if (typeof primaryControl.getFormContext === 'function' 
                 && typeof(primaryControl.getFormContext()).getAttribute === 'function') {
            formContext = primaryControl.getFormContext(); // most likely called from the form via a handler
         }
    }
}

The post Error : getFormContext is not a function in UCI , Ribbon Button appeared first on Microsoft Dynamics 365 Blog.

]]>
4089
Migration from Legacy WebClient to UCI – Deprecated Javascript (Client Api) Collection Book , Replace Deprecated Client API To New and latest Client Api’s http://microsoftdynamics.in/2020/08/22/migration-from-legacy-webclient-to-uci-deprecated-javascript-client-api-collection-book-replace-deprecated-client-api-to-new-and-latest-client-apis/ Sat, 22 Aug 2020 12:05:40 +0000 http://microsoftdynamics.in/?p=4081 The post Migration from Legacy WebClient to UCI – Deprecated Javascript (Client Api) Collection Book , Replace Deprecated Client API To New and latest Client Api’s appeared first on Microsoft Dynamics 365 Blog.

]]>

Most of us are already using updated client API and replacing example like xrm.page to FormContext, Below is

1. How to replace Deprecated Client API Javascript with New

2. Full Deprecated to New client API Table

There are some big changes in Client API and most of them are as below

  • Execution Context: Context of any item on the form (Xrm.Page)
  • Global Context: utility to retrieve org Information example, userID e.t.c  (Xrm.utility)
  • Deprecated Client Apis and Intrrotucing some new

We will Divide the post in 2 parts

  1. Replace Deprecated Client API To New and latest Client Api’s
  2. Full Deprecated Client API vs new and Latest Client API’S Table

Check1: How to Replace Deprecated Client Apis to New

  1. First approach is to use Upgrade examiner, please check out our last blog as below how to use Fast track and use upgrade examiner as a starter.

    Click Here: http://microsoftdynamics.in/2020/07/16/migration-from-legacy-webclient-to-uci-ask-for-fasttrack-and-upgrade-examiner-not-confident-on-transition-ask-microsoft/

  2. Once you changed the latest client API’s there is a major change with Xrm.Page
    -> 1st enable checkbox ” Pass execution context as the first Parameter -> ExecutionContext is Automatically passed as 1st parameter as below

Check2: Full Deprecated Client API vs new and Latest Client API'S Table

Objective Using Xrm.Page (Deprecated Client API) Using formContext (Replacement Client API)
Simple JavaScript function function demoFunction(){ } function demoFunction(eContext){
//Get form context
var formContext = eContext.getFormContext();
}
Disable/lock field, “addRegions”, for selection Xrm.Page.getControl("addRegions").
setDisabled(true);
formContext.getControl("addRegions").
setDisabled(true);
Enable/unlock field, “addRegions”, for selection Xrm.Page.getControl("addRegions").
setDisabled(false);
formContext.getControl("addRegions").
setDisabled(false);
Hide field, “addRegions” Xrm.Page.getControl("addRegions").
setVisible(false);
formContext.getControl("addRegions").
setVisible(false);
Show field, “addRegions” Xrm.Page.getControl("addRegions").
setVisible(true);
formContext.getControl("addRegions").
setVisible(true);
Get lookup field “region”, and its properties var regionLookup = Xrm.Page.
getAttribute("region").getValue();
if (regionLookup != null) {
var name = regionLookup[0].name;
var guid = regionLookup[0].

id.slice(1, -1);
var entityType =

regionLookup[0].entityType;
}
var regionLookup = formContext.
getAttribute("region").getValue();
if ( regionLookup != null) {
var name = regionLookup[0].name;
var guid = regionLookup[0].

id.slice(1, -1);
var entityType =

regionLookup[0].entityType;
}
Remove option, 15220000, from ‘showRegions’ option set. Xrm.Page.getControl("showRegions").
removeOption(15220000);
formContext.getControl("showRegions").
removeOption(15220000);
Add option, 15220001 (with text: ‘Africa’), to ‘showRegions’ option set. Xrm.Page.getControl("showRegions").
addOption({
value:15220001,
text:'Africa'});
formContext.getControl("showRegions").
addOption({
value:15220001,
text:'Africa'});
Show tab, with logical name “regionsTab” Xrm.Page.ui.tabs.get("regionsTab").
setVisible(true);
formContext.ui.tabs.get("regionsTab").
setVisible(true);
Hide tab, with logical name “regionsTab” Xrm.Page.ui.tabs.get("regionsTab").
setVisible(false);
formContext.ui.tabs.get("regionsTab").
setVisible(false);
Show section “regionsTab_regSection”, located in tab “regionsTab” Xrm.Page.ui.tabs.get("regionsTab").
sections.get("regionsTab_regSection").
setVisible(true);
formContext.ui.tabs.get("regionsTab").
sections.get("regionsTab_regSection").
setVisible(true);
Hide section “regionsTab_regSection”, located in tab “regionsTab” Xrm.Page.ui.tabs.
get("regionsTab").sections.
get("regionsTab_regSection").
setVisible(false);
formContext.ui.tabs.
get("regionsTab").sections.
get("regionsTab_regSection").
setVisible(false);
Count number of records on sub-grid called “demo-grid” var count = Xrm.Page.
getControl("demo-grid").getGrid().

getTotalRecordCount();
var count = formContext.
getControl("demo-grid").getGrid().
getTotalRecordCount();
Deprecated Client API Replacement Client API Comments
Xrm.Page Forms: ExecutionContext.getFormContext
Commands: Send it as the PrimaryControl parameter
Use of the Xrm.Page object as a static access to the primary form context is still supported to maintain backward compatibility with the existing scripts. Based on the feedback, we understand that the usage of Xrm.Page is high, and it won’t be removed as soon as some other client API methods listed in this section. We encourage you to use the new way of getting form content where possible. More information: Client API form context
Although Xrm.Page is deprecated, parent.Xrm.Page will continue to work in case of HTML web resources embedded in forms as this is the only way to access the form context from the HTML web resource.
Xrm.Page.context Xrm.Utility.getGlobalContext Allows access to the global context without going through the form context.
Xrm.Page.context.getQueryStringParameters formContext.data.attributes The formContext.data.attributes API will make retrieval of non-entity bound data consistent across entity forms, metadata-driven dialogs, and task-based flows. The data will be a combination of custom values sent using the query string and what was specified in the parameters in the openForm method.
Xrm.Page.context.getTimeZoneOffsetMinutes globalContext.userSettings.getTimeZoneOffsetMinutes Moved to globalContext.userSettings
Xrm.Page.context.getUserId globalContext.userSettings.userId Moved to globalContext.userSettings
Xrm.Page.context.getUserLcid globalContext.userSetings.languageId Moved to globalContext.userSettings
Xrm.Page.context.getUserName globalContext.userSettings.userName Moved to globalContext.userSettings
Xrm.Page.context.getUserRoles globalContext.userSettings.securityRoles Moved to globalContext.userSettings
Xrm.Page.context.getIsAutoSaveEnabled globalContext.organizationSettings.isAutoSaveEnabled Moved to globalContext.organizationSettings
Xrm.Page.context.getOrgLcid globalContext.organizationSettings.languageId Moved to globalContext.organizationSettings
Xrm.Page.context.getOrgUniqueName globalContext.organizationSettings.uniqueName Moved to globalContext.organizationSettings
Xrm.Page.data.entity.getDataXml No change in the method, but use “typename” instead of type for lookup attributes.
GridRow.getData GridRow.data GridRow is essentially a form context. This change unifies the interface of GridRow with formContext.
GridRowData.getEntity GridRowData.entity GridRowData is form data. This change unifies the interface of GridRowData with formContextData.
Xrm.Mobile.offline Xrm.WebApi.offline Moved the offline-related methods under Xrm.WebApi.offline
parent.Xrm Use one of the following:

a) Use a custom control created using Power Apps component framework instead of HTML web resources.

b) On forms, use the getContentWindow method of the web resource control.

c) If the getContentWindow method doesn’t work, you can use parent.Xrm to get to the Xrm object inside an HTML web resource. If the HTML web resource is opened in a new window then you should use opener.Xrm instead.

Earlier: An HTML web resource may interact with the Xrm.Page or Xrm.Utility objects within the form by using parent.Xrm.Page or parent.Xrm.Utility.

Now: parent.Xrm.* will work if the HTML web resource is loaded in a form container. It won’t work for HTML web resources that are stand alone, or referenced from the site map or any other places.

NOTEparent.Xrm will be removed after the removal of the ClientGlobalContext.js.aspx page; dates yet to be announced.

addOnKeyPress Use a custom control created using Power Apps component framework
fireOnKeyPress Use a custom control created using Power Apps component framework
removeOnKeyPress Use a custom control created using Power Apps component framework
showAutoComplete Use a custom control created using Power Apps component framework
hideAutoComplete Use a custom control created using Power Apps component framework
Xrm.Utility.alertDialog Xrm.Navigation.openAlertDialog The new signature is consistent with other APIs (openForm) and takes a new set of parameters for flexibility.
Xrm.Utility.confirmDialog Xrm.Navigation.openConfirmDialog The new signature is consistent with other APIs (openForm) and takes a new set of parameters for flexibility.
Xrm.Utility.getBarcodeValue Xrm.Device.getBarcodeValue Moving device-related actions to Xrm.Device
Xrm.Utility.getCurrentPosition Xrm.Device.getCurrentPosition Moving device-related actions to Xrm.Device
Xrm.Utility.isActivityType Xrm.Utility.getEntityMetadata The isActivityType method is synchronous so it was suitable for ribbon rules. However, the replacement method, getEntityMetadata, is asynchronous, and is not suitable for ribbon rules.
Xrm.Utility.openEntityForm Xrm.Navigation.openForm Moving navigation actions to Xrm.Navigation
Xrm.Utility.openQuickCreate Xrm.Navigation.openForm Moving navigation actions to Xrm.Navigation
Xrm.Utility.openWebResource Xrm.Navigation.openWebResource Moving navigation actions to Xrm.Navigation
Note: This API returns VOID in Unified Interface.
globalContext.organizationSettings.baseCurrencyId globalContext.organizationSettings.baseCurrency The replacement method lets you access the display name along with the ID of transaction currency.
globalContext.userSettings.securityRoles globalContext.userSettings.Roles The replacement method lets you access the display name along with the ID of the security roles.
globalContext.userSettings.transactionCurrencyId globalContext.userSettings.transactionCurrency The replacement method lets you access the display name along with the ID of transaction currency.
getData and setData for Silverlight web resources None Silverlight is no longer supported. These methods won’t be available after October, 2020.
formContext.data.entity.save formContext.data.save
ClientGlobalContext.js.aspx None The ClientGlobalContext.js.aspx page is built on the legacy web client infrastructure. As the legacy web client is deprecated and scheduled to be unavailable effective December 1, 2020, the ClientGlobalContext.js.aspx page will also be removed along with the legacy web client on December 1, 2020.
getObject getContentWindow

Reference: https://docs.microsoft.com/en-us/power-platform/important-changes-coming#some-client-apis-are-deprecated

The post Migration from Legacy WebClient to UCI – Deprecated Javascript (Client Api) Collection Book , Replace Deprecated Client API To New and latest Client Api’s appeared first on Microsoft Dynamics 365 Blog.

]]>
4081
Pass executionContext or formContext from Ribbon WorkBench button in UCI Unified client interface http://microsoftdynamics.in/2020/08/22/pass-execution-context-or-form-context-from-ribbon-workbench-in-uci-unified-client-interface/ Sat, 22 Aug 2020 10:32:24 +0000 http://microsoftdynamics.in/?p=4071 With Depreciation of xrm.page which was used to get attribute/property of an item of form. We all have switched to the latest FormContext which require executionContext need top be passed as a Parameter "Pass Execution Context as First Parameter" from event

Now how to pass ExecutionContext for the javascript action used for a Button on Ribbon Workbench

1 Open Ribbon WorkBench
2 Select Solution contains entity and components
3 Add button, Add command
4 Now add Javascript Action and select Javascript and Function
5 Now Click on Add Parameter

The post Pass executionContext or formContext from Ribbon WorkBench button in UCI Unified client interface appeared first on Microsoft Dynamics 365 Blog.

]]>

With Depreciation of xrm.page which was used to get attribute/property of an item of form. We all have switched to the latest FormContext which require executionContext need top be passed as a Parameter "Pass Execution Context as First Parameter" from event

Now how to pass ExecutionContext for the javascript action used for a Button on Ribbon Workbench

From Event Handler Property we can simply enable checkbox  “Pass execution context as first parameter ” and use that for Form Context as Below

And we can get FormContext from 1st parameter Execution Parameter.

function readXML(executionContext) {   
 if (executionContext !== null) {

             formContext =  executionContext.getFormContext();
   }
alert("executionContext  is null ");
}

How to Pass ExecutionContext or FormContext for a JS action on the button in Ribbon Workbench

  1. Open Ribbon WorkBench
  2. Select Solution contains entity and components
  3. Add button, Add command
  4. Now add Javascript Action and select Javascript and Function
  5. Now Click on Add Parameter
  6. Add CRM Parameter

  7. and select Primary  Control

1 thing to remember, like for Form Button , always use PrimaryControl as Form Control

function readXML(executionContext) {   
 if (executionContext !== null) {

             formContext =  executionContext;  //PrimaryControl
   }
alert("executionContext  is null ");
}

The post Pass executionContext or formContext from Ribbon WorkBench button in UCI Unified client interface appeared first on Microsoft Dynamics 365 Blog.

]]>
4071
OOB Rich Text Html editor control now available only for Unified client control http://microsoftdynamics.in/2020/08/16/oob-rich-text-html-editor-control-now-available-only-for-unified-client-control/ Sun, 16 Aug 2020 16:07:58 +0000 http://microsoftdynamics.in/?p=4055 Now we have out of the box Rich text Editor control available with early access to 2020 release wave 2. Please go through more post on Release 2020 wave 2

The post OOB Rich Text Html editor control now available only for Unified client control appeared first on Microsoft Dynamics 365 Blog.

]]>
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/08/img_5f39585b6bc37.png?fit=2006%2C862

Now we have out of the box Rich text HTML Editor control available with early access to 2020 release wave 2. Please go through more post on Release 2020 wave 2 from Nishant's Blog link below

As in out last post, we added an HTML and js Web resource to enable Rich text editor control to a field without importing any 3rd party Solution, please refer the link below if still wants it in the legacy app.

Click Here: http://microsoftdynamics.in/2020/07/16/rich-text-editor-html-designer-for-microsoft-dynamics-365-crm-using-javascript-no-pcf/

Now the good news is we don’t have to write or use 3rd party PCF control or solution to enable Rich-text HTML editor Control, this is enabled when enabling Early access to 2020 release wave 2. and there are many other post can be checked from Nishant’s sir post where he explained

  1. How to enable early access to 2020 release Wave 2: Click Here
  2. Check other Posts on release 2020 wave 2: Click Here
  1. Select the multiple-line text field, below we selected description field of Knowledge article
  2. Go to Controls and click add control, Select Rich Text editor control and ADD

  3. Select where to enable here you can see all devices are compatible and that’s due to the responsiveness of UI

  4.  Save and publish and field will be enabled with Rich-text HTML control.
    Note: only for UCI forms

References :

Posts on 2020 Release wave 2 – Dynamics 365

https://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave2/

The post OOB Rich Text Html editor control now available only for Unified client control appeared first on Microsoft Dynamics 365 Blog.

]]>
4055
Associate or Disassociate Records for 1:N or N:N Relationship using Power Automate Relate Action CDS http://microsoftdynamics.in/2020/08/14/associate-or-disassociate-records-for-1n-or-nn-relationship-using-power-automate-relate-action-cds/ Thu, 13 Aug 2020 21:26:24 +0000 http://microsoftdynamics.in/?p=4014 We can Associate or disassociate two entity record with N:N or 1: N relationship using Power Automate
Connector to use: common data service (current environment)
Action to use: Relate Records

The post Associate or Disassociate Records for 1:N or N:N Relationship using Power Automate Relate Action CDS appeared first on Microsoft Dynamics 365 Blog.

]]>

We can Associate or disassociate two entity record with N:N or 1: N relationship using Power Automate
Connector to use: common data service (current environment)
Action to use: Relate Records

We would be using Contact and campaign N:N Custom Relationship when Contact is created get source campaign from lead and map with contact.

  1. Create new Automated Flow

  2. Name the Flow and Choose Trigger, in our case its creation of record contact

  3. Get Lead Record Item Unique id as Lead Source, To get source Campaign ID

  4. Now We have Source Campaign ID from Lead and Contact Id, But to use relate Action we need OData URL for a related entity that is Campaign
    https://organizationName.crm8.dynamics.com/api/data/v9.0/campaigns(0d8dda4c-126e-e911-a980-000d3ae4c063)
    Where GUID will be mapped with Dynamics field value campaign ID

  5. Selecting Action Relate record this action, Select Primary Entity i.e contact, Map Contact unique id, Relationship Name, URL

Save and Turn On the flow. Now each time contact is created and source lead contains campaign both will be associated using relate action.

Unrelate Action can be used to Disassociate the record same way.

The post Associate or Disassociate Records for 1:N or N:N Relationship using Power Automate Relate Action CDS appeared first on Microsoft Dynamics 365 Blog.

]]>
4014
ENABLE OR DISABLE TRACKED TO DYNAMICS 365 FROM OUTLOOK http://microsoftdynamics.in/2020/08/14/enable-or-disable-tracked-to-dynamics-365-from-outlook/ Thu, 13 Aug 2020 19:45:46 +0000 http://microsoftdynamics.in/?p=3999 Server-side synchronization now allows tracking of emails, appointments, and tasks in Outlook and adds a new Category Tracked to Dynamics 365
For version 9.1.0.4039 or higher, category Tracked to Dynamics 365 is by default on, We can disable this for an organization using Admin settings

The post ENABLE OR DISABLE TRACKED TO DYNAMICS 365 FROM OUTLOOK appeared first on Microsoft Dynamics 365 Blog.

]]>

Server-side synchronization now allows tracking of emails, appointments, and tasks in Outlook and adds a new Category Tracked to Dynamics 365
For version 9.1.0.4039 or higher, category Tracked to Dynamics 365 is by default on, We can disable this for an organization using Admin settings

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/08/img_5f3592de5d47f.png?fit=1497%2C728

Disable or Remove Category Tracked to Dynamics 365 on all Exchange mailboxes of the Dynamics 365

There are 2 Option

  1. Remove Category Tracked to Dynamics 365 using setting from OrgDBOrgSetting/Releases and same can be used to Enable setting
    https://github.com/seanmcne/OrgDbOrgSettings/releases/

  2. From admin.powerplateform.microsoft.com disable setting-> Access https://admin.powerplatform.microsoft.com as an administrator
    -> On the Environments tab, click  next to the name of the environment and then click Settings.
    -> Click Email Tracking.

    -> Locate the option People can use categories to track emails and appointments and switch the option to Off.

->Disabling this setting will remove the category Tracked to Dynamics 365 on all Exchange mailboxes of the Dynamics 365 for Customer Engagement organization which have server-side synchronization enabled in about 15 minutes.

The post ENABLE OR DISABLE TRACKED TO DYNAMICS 365 FROM OUTLOOK appeared first on Microsoft Dynamics 365 Blog.

]]>
3999