uci Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/tag/uci/ 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 uci Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/tag/uci/ 32 32 176351444 UCI : Disable Editable Grid for Entity list , Unable to double click lead record from entity list or getting error while opening record from Entity list http://microsoftdynamics.in/2020/09/29/disable-editable-grid-for-entity-list-unable-to-double-click-lead-record-from-entity-list-or-getting-error-while-opening-record-from-entity-list-uci/ Tue, 29 Sep 2020 17:28:25 +0000 http://microsoftdynamics.in/?p=4198 We have enabled the Editable grid for sub-grid and quite familiar how it works but using it on entity list is not so common as we have thousands of records and we don't want to mess with validation like a duplicate rule or business rule in Entity list.

But if by any chance you have enabled editable grid in Entity List it will be following up with lots of validation issues over UCI. Below are the steps to disable it. With Control option over Entity itself

The post UCI : Disable Editable Grid for Entity list , Unable to double click lead record from entity list or getting error while opening record from Entity list appeared first on Microsoft Dynamics 365 Blog.

]]>

We have enabled the Editable grid for sub-grid and quite familiar how it works but using it on entity list is not so common as we have thousands of records and we don't want to mess with validation like a duplicate rule or business rule in Entity list.

But if by any chance you have enabled editable grid in Entity List it will be following up with lots of validation issues over UCI. Below are the steps to disable it. With Control option over Entity itself

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/09/ERROR-WHILE-OPRNING-LEAD-RECORD.png?fit=1744%2C830

We can see in the above image there is legacy data that is duplicate and was ignored and saved, but when Migrating to UCI the Entity list is having Editable control which does not allow to open record because of this duplicate rule but nor giving any exact error.

  1. we can disable Editable gird control from the entity.

  2.  We can do modification to duplicate rule as desired so we can avoid error in entity list

  3. Or we can review Business Rule as well especially the one with Entity as the scope

Hoping this was helpful. thanks

The post UCI : Disable Editable Grid for Entity list , Unable to double click lead record from entity list or getting error while opening record from Entity list appeared first on Microsoft Dynamics 365 Blog.

]]>
4198
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
Get AppID of Dynamics 365 Crm App in power Automate – UCI http://microsoftdynamics.in/2020/09/12/get-appid-of-dynamics-365-crm-app-in-power-automate-uci/ Sat, 12 Sep 2020 14:40:51 +0000 http://microsoftdynamics.in/?p=4135 In Our last post we dynamically created Record URL in power automate but skipped Appid part ,

Click here for: http://microsoftdynamics.in/2020/09/12/uci-get-entity-record-url-or-generate-dynamic-record-url-of-a-record-in-power-automate-using-cds-connector-and-variable/

Below are the steps

Create an entity "Organization Config" and create 2 fields,
Sales hub App ID and Service Hub App ID

Add Entity in Model-Driven App and side map where ever we want to keep it

Now We will open our Power automate flow we created in the last post, Add an action "List Records"

As we are using List Records which will give multiple results, we can use Odata filter or Fetch XMl to fetch the records

This action gives Collection as output, we will use the below expression to get value from 1st record.

body('get_org_config_list')?['value']?[0]?.dvm_salesappid

Now we will use compose action output in our variable

The post Get AppID of Dynamics 365 Crm App in power Automate – UCI appeared first on Microsoft Dynamics 365 Blog.

]]>

Each Model Driven App has a Unique ID and OOB there is no action in power automate to get ID of a particular required APP, Below are the step we can use to fulfill the requirement to get AppID in Power automate

In Our last post we dynamically created Record URL in power automate but skipped Appid part ,

Click here for: http://microsoftdynamics.in/2020/09/12/uci-get-entity-record-url-or-generate-dynamic-record-url-of-a-record-in-power-automate-using-cds-connector-and-variable/

Below are the steps

  • Create an entity “Organization Config” and create 2 fields,
    Sales hub App ID and Service Hub App ID

  • Add Entity in Model-Driven App and side map where ever we want to keep it

  • Now We will open our Power automate flow we created in the last post, Add an action “List Records”

  • As we are using List Records which will give multiple results, we can use Odata filter or Fetch XMl to fetch the records

  • This action gives Collection as output, we will use the below expression to get value from 1st record.

    body('get_org_config_list')?['value']?[0]?.dvm_salesappid

  • Now we will use compose action output in our variable

The post Get AppID of Dynamics 365 Crm App in power Automate – UCI appeared first on Microsoft Dynamics 365 Blog.

]]>
4135
UCI : Get Entity Record URL or Generate Dynamic Record URL of a Record in Power automate using CDs connector and Variable http://microsoftdynamics.in/2020/09/12/uci-get-entity-record-url-or-generate-dynamic-record-url-of-a-record-in-power-automate-using-cds-connector-and-variable/ Sat, 12 Sep 2020 12:14:06 +0000 http://microsoftdynamics.in/?p=4120 In Point 1 we got the environment url and from point 2 we know how to get AppId as well, but here we are not using appid and if we don't use it that doesn't it will automatically open it available app as per permission.

We created an Trigger as update of case
Using compose output and get record we got the Odata URL as well
Now we will initialize Variable just to get the final output of the dynamic record URL, we can do this directly in email as well.

 Now we will use Hyperlink or ancher html tag to use Record url in Email

In Output we can see our URL which can be with or withour CMDBAR and NAVBAR

The post UCI : Get Entity Record URL or Generate Dynamic Record URL of a Record in Power automate using CDs connector and Variable appeared first on Microsoft Dynamics 365 Blog.

]]>

We would be using power automated flow to generate a dynamic record URL, we will also check how to get the Current Record URL in power to automate

The Scenario we had is when a case is resolved, send an email to the manager of the record that the Case is resolved including Record URL.

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

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

  6. ENT: ent stands for Entity where we define the name of entity example account, contact, incident in our case
  7. 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 Dahsboard

Check 1: Get Environment in Power automate flow

  • As per the Scenario, we added trigger as an update of the case with a filter as status should be equal to 5 (problem resolved)

  • Now ideally we should get Environment URL in the Dynamic field OdataID as below but that will not come up when the trigger happens from CDS
  • So we will use Action to Get Case using Trigger ID, We know its repeated step but this is needed to get Environment URL, and we can limit attribute retrieving. We are using Compose action to verify our output

  • Here we get the full Odatat URL, not just the Environment URL, so we will be using an Expression uriHosts(outputs(‘URL’)
  • Compose action: uriHosts(outputs(‘URL’) , Where outputs is output of compose and (‘url’) action name refer screenshot
  • Other Action: uriHost(body(‘ActionName’)?[‘@odata.id’]) 

Check 2: Get Appid in power automate

AppId can no be retrieved directly in Power automate.

  1. we use a configuration ” organization config”  where we store multiple appid example sales hub , customer hub etc
  2. We will use get record action to retrieve the required appid.

Check 2: Generate dynamics record URl in power automate and use in Email

In Point 1 we got the environment url and from point 2 we know how to get AppId as well, but here we are not using appid and if we don’t use it that doesn’t it will automatically open it available app as per permission.

  1. We created an Trigger as update of case
  2. Using compose output and get record we got the Odata URL as well
  3. Now we will initialize Variable just to get the final output of the dynamic record URL, we can do this directly in email as well.

  4.  Now we will use Hyperlink or ancher html tag to use Record url in Email

In Output we can see our URL which can be with or withour CMDBAR and NAVBAR

The post UCI : Get Entity Record URL or Generate Dynamic Record URL of a Record in Power automate using CDs connector and Variable appeared first on Microsoft Dynamics 365 Blog.

]]>
4120
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
Migration from Legacy WebClient to UCI – Ribbon Button Icon issue – Old Legacy WebClient Button not supported in UCI – ModernImage -SVG http://microsoftdynamics.in/2020/07/11/migration-from-legacy-webclient-to-uci-ribbon-button-icon-issue-old-legacy-webclient-button-not-supported-in-uci-modernimage-svg/ Sat, 11 Jul 2020 14:05:56 +0000 http://microsoftdynamics.in/?p=3942 Migration from Legacy Webclient to UCI - Unified client interface - Step by Step move from Legacy WebClient to Unified Client Interface UCI -

Identify the most critical components and the commonly shared component (which almost no effect)
Setup Development environment for UCI upgrade and keeping in mind we also have to support fixes and CR to legacy WebClient
So now we have 3 Properties control

Image 16 for 16*16 png or jpg image and used in classic Legacy WebClient
Image 32 for 32*32 png or jpg image and used in Classic Legacy WebClient
ModernImage SVG format independent of Resolution used in New UCI 

The post Migration from Legacy WebClient to UCI – Ribbon Button Icon issue – Old Legacy WebClient Button not supported in UCI – ModernImage -SVG appeared first on Microsoft Dynamics 365 Blog.

]]>
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/07/Ribbon-Button-Icon-issue-Old-Legacy-WebClient-Button-not-supported-in-UCI-ModernMode.jpg?fit=1729%2C574

For New UCI Image16 and Image 32, Property Control doesn't work (PNG or JPG) and Support SVG image in New Property "ModernImage"

SVG – Scalable Vector Graphics is most suitable for the Responsive page as it can be scaled high and keeping almost same Quality and that is the Reason these images suit the New UCI Responsive page. 

Below are some advantage for Using SVG

  • SVG images can be created and edited with any text editor
  • SVG images can be searched, indexed, scripted, and compressed
  • SVG images are scalable
  • SVG images can be printed with high quality at any resolution
  • SVG images are zoomable
  • SVG graphics do NOT lose any quality if they are zoomed or resized
  • SVG is an open standard
  • SVG files are pure XML

What are the changes we need to do

  1. No change required for OOB system buttons when Transition happens it automatic updates
  2. For Custom Button and Icon we need to Add SVG image in MorderImage Property from Ribbon workBench and we can keep Image 16 and image 32 if you want but it recommended we change them too.

Check 1 For Custom Button Icon we need to Add SVG image in MorderImage Property from Ribbon workBench and we can keep Image 16 and image 32 if you want but it recommended we change them too.

So now we have 3 Properties control

  1. Image 16 for 16*16 png or jpg image and used in classic Legacy WebClient
  2. Image 32 for 32*32 png or jpg image and used in Classic Legacy WebClient
  3. ModernImage SVG format independent of Resolution used in New UCI

Below are the steps to add SVG image in Modern Image

  1. Create a New Web Resource with type as Vector Format (SVG) and Upload image

  2. Now Open Ribbon WorkBench, If not installed install it from here
  3. If button properties are disabled. right-click a select Customise button

  4. Publish the Ribbon and we can now see the correct image in our Button at UCI.

The post Migration from Legacy WebClient to UCI – Ribbon Button Icon issue – Old Legacy WebClient Button not supported in UCI – ModernImage -SVG appeared first on Microsoft Dynamics 365 Blog.

]]>
3942
Migration from Legacy WebClient to UCI – RibbonActions.js Deprecated in Dynamics 365 Unified Interface – Replace it with Execute PowerAutomate from Ribbon button using JS http://microsoftdynamics.in/2020/07/11/migration-from-legacy-webclient-to-uci-ribbonactions-js-deprecated-in-dynamics-365-unified-interface-replace-it-with-execute-powerautomate-from-ribbon-button-using-js/ Fri, 10 Jul 2020 20:05:57 +0000 http://microsoftdynamics.in/?p=3916 If your button not working most probably you are using RibbonAction or Ribbon Workflow , you might have used Ribbon Workbench to enable Command where using RibbonAction.js onto your ribbon button.
so bad news is it has been Deprecated, below is the link from ribbon workbench Blog , you can go through it to remove it from Button

https://ribbonworkbench.uservoice.com/knowledgebase/articles/132235-create-a-workflow-short-cut-ribbon-button-no-code

The post Migration from Legacy WebClient to UCI – RibbonActions.js Deprecated in Dynamics 365 Unified Interface – Replace it with Execute PowerAutomate from Ribbon button using JS appeared first on Microsoft Dynamics 365 Blog.

]]>
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/07/RibbonActions-js-Deprecated-in-Dynamics-365-Unified-Interface-dvmske.jpg?fit=1582%2C698

We might be getting above Error with the Custom Ribbon Button where we using RibbonAction.js

-Ribbon Button not working (RibbonAction.js has been deprecated)

  • If your button not working most probably you are using RibbonAction or Ribbon Workflow , you might have used Ribbon Workbench to enable Command where using RibbonAction.js onto your ribbon button.
  • so bad news is it has been Deprecated, below is the link from ribbon workbench Blog , you can go through it to remove it from Button

https://ribbonworkbench.uservoice.com/knowledgebase/articles/132235-create-a-workflow-short-cut-ribbon-button-no-code

  • We can use JS to execute the Workflow or Action
  • or I would recommend following this post:

The post Migration from Legacy WebClient to UCI – RibbonActions.js Deprecated in Dynamics 365 Unified Interface – Replace it with Execute PowerAutomate from Ribbon button using JS appeared first on Microsoft Dynamics 365 Blog.

]]>
3916