unified client Interface Archives - Microsoft Dynamics 365 Blog https://microsoftdynamics.in/tag/unified-client-interface/ 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&ssl=1 unified client Interface Archives - Microsoft Dynamics 365 Blog https://microsoftdynamics.in/tag/unified-client-interface/ 32 32 176351444 Trigger Power automate using WebHook (Plugin Registration tool) and throw exception / response in real time https://microsoftdynamics.in/2020/09/14/trigger-power-automate-using-webhook-plugin-registration-tool-and-throw-exception-response-in-real-time/ Mon, 14 Sep 2020 12:53:28 +0000 http://microsoftdynamics.in/?p=4148 As we know we can use WebHooks to creating external handlers for server events, like azure service bus or any other web service.

in this post

we will create power automate with action as ” when an HTTP request is received”
Get HTTP Post URL, Will break the URL as URL and parameters
Register a webhook using the plugin registration tool
Register a step on the update of the account name.
Adding the “Response” action in power automate to see exception in CRM using webhook

The post Trigger Power automate using WebHook (Plugin Registration tool) and throw exception / response in real time appeared first on Microsoft Dynamics 365 Blog.

]]>

In our last 3 posts, we checked 3 different methods of triggering Power automate, Below are the links

In today's post, we will check 4th method of triggering Power automate flow using WebHook in the plugin Registration tool

As we know we can use WebHooks to creating external handlers for server events, like azure service bus  or any other web service.

in this post

  1. we will create power automate with action as ” when an HTTP request is received”
  2. Get HTTP Post URL, Will break the URL as URL and parameters
  3. Register a webhook using the plugin registration tool
  4. Register a step on the update of the account name.
  5. Adding the “Response” action in power automate to see exception in CRM using webhook

Check1: Create Power automate with Action "When a HTTP request is recived"

  1. Create Instant flow and select action “When a HTTP request is Received”  with Method as post and Payload generic

  2. Once Saved we will get the URL , copy the URL and Break it down as below to specify HTTP query parameter in webhook.

    https://prod-25.centralindia.logic.azure.com:443/workflows/73a854555aaa5fad8f867ac168/triggers/manual/paths/invoke
    
    api-version=2016-06-01
    sp=/triggers/manual/run
    sv=1.0
    sig=Sxfp4x5V51JDEeSYuf4mvxTXlGR2xTxn3WeQiab00yY
    

Check2: Register WebHook to trigger power atomate flow and Register an Step for acccount update

  1. Login to plugin Registration tool and register new WebHook with Below config and Http Post URL.

  2. Now Register new Step on Update of Account entity, field = account name.

  3. All Done, If we want to add some condition and throw an exception for any condition, we can do so by adding “response ” in  Power automate

It would be a kind of realtime exception even we know the flow is meant to be working in async.

The post Trigger Power automate using WebHook (Plugin Registration tool) and throw exception / response in real time appeared first on Microsoft Dynamics 365 Blog.

]]>
4148
UCI : Get Entity Record URL or Generate Dynamic Record URL of a Record in Power automate using CDs connector and Variable https://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 https://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&ssl=1

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 https://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 https://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 https://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 https://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&ssl=1

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
Migration from Legacy WebClient to UCI – Ask for FastTrack and Upgrade Examiner – Not confident on transition ask Microsoft https://microsoftdynamics.in/2020/07/16/migration-from-legacy-webclient-to-uci-ask-for-fasttrack-and-upgrade-examiner-not-confident-on-transition-ask-microsoft/ Thu, 16 Jul 2020 13:27:29 +0000 http://microsoftdynamics.in/?p=3967 Microsoft has FastTrack Service and Upgrade Examiner Solution for Customer, not confidence on the Transition or wants to be 100 sure they are not missing anything

We were preparing for the transition like doing validation of web resource forms etc but to be more confident we included Microsoft support and requested for Fast Track services.

What is Fast Track ?
FastTrack helps customers deploy Microsoft cloud solutions. Customers with eligible subscriptions to Microsoft 365, Azure, or Dynamics 365 can use FastTrack at no additional cost for the life of their subscription.

and the coolest part is when we open any of the javascript it gives us the control to compare OLD CODE and NEW CODE (Suggested)

The post Migration from Legacy WebClient to UCI – Ask for FastTrack and Upgrade Examiner – Not confident on transition ask Microsoft appeared first on Microsoft Dynamics 365 Blog.

]]>
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/07/Migration-from-Legacy-WebClient-to-UCI-Ask-for-FastTrack-and-Upgrade-Examiner-Not-confident-on-transition-ask-Microsoft.jpg?fit=1581%2C1063&ssl=1

Microsoft has FastTrack Service and Upgrade Examiner Solution for Customer, not confidence on the Transition or wants to be 100 sure they are not missing anything

We were preparing for the transition like doing validation of web resource forms etc but to be more confident we included Microsoft support and requested for Fast Track services.

What is Fast Track ?

FastTrack helps customers deploy Microsoft cloud solutions. Customers with eligible subscriptions to Microsoft 365, Azure, or Dynamics 365 can use FastTrack at no additional cost for the life of their subscription.

With Fast Track Service and Support, Microsoft Imported Upgrade Examiner , we will see the benefits of the same below

Benifit of Upgrade Examiner

Although in our previous post we are doing Validation Entity wise considering all component to be tested, But this solution is also helpful

  • It performs Validation on the list of component and provides suggestion and example what component needs attention

  • If we Go through Entity Data and clicks Libraries, it gives us a list of Web resource with no of Remediation found

  • and the coolest part is when we open any of the javascript it gives us the control to compare OLD CODE and NEW CODE (Suggested)

  • In some cases, we can directly copy and past New code to the library but suggested to verify 1st.

The post Migration from Legacy WebClient to UCI – Ask for FastTrack and Upgrade Examiner – Not confident on transition ask Microsoft appeared first on Microsoft Dynamics 365 Blog.

]]>
3967
Migration from Legacy WebClient to UCI – Ribbon Button Icon issue – Old Legacy WebClient Button not supported in UCI – ModernImage -SVG https://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&ssl=1

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 https://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&ssl=1

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