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 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.
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.
]]>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.
]]>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.
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.
]]>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.
]]>In Our last post we dynamically created Record URL in power automate but skipped Appid part ,
Below are the steps
body('get_org_config_list')?['value']?[0]?.dvm_salesappid
The post Get AppID of Dynamics 365 Crm App in power Automate – UCI appeared first on Microsoft Dynamics 365 Blog.
]]>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.
]]>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
AppId can no be retrieved directly in Power automate.
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.
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.
]]>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.
]]>The post is Divided into 2 Parts
We will action “When an Http Request is received ” and follow below steps
As in our previous post we already mentions steps to register and use it in Javascript
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); }
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 .
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.
]]>We got this error in UCI and not in Legacy WebClient,
function readXML(primaryControl) { var formContext = null; if (primaryControl!== null) { formContext = primaryControl.getFormContext(); } } }
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.
]]>There are some big changes in Client API and most of them are as below
We will Divide the post in 2 parts
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/
Objective | Using Xrm.Page (Deprecated Client API) | Using formContext (Replacement Client API) |
Simple JavaScript function | function demoFunction(){ } |
function demoFunction(eContext){ |
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(); id.slice(1, -1); regionLookup[0] .entityType; |
var regionLookup = formContext. getAttribute("region").getValue(); id.slice(1, -1); 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({ |
formContext.getControl("showRegions"). addOption({ |
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"). |
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"). |
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. 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 |
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. NOTE: |
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.
]]>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.
]]>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
What are the changes we need to do
So now we have 3 Properties control
Below are the steps to add SVG image in Modern Image
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://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://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.
]]>