Posts

DATA CENTER REGIONS FOR DYNAMICS 365

Image
The online version of Dynamics 365 is being hosted in datacenters that exist in many regions. Based on the country/region you selected during the sign-up, the datacenter will be chosen to store data for your environments. This selection will be reflected into the URL of your Dynamics 365 environment where you can guess the region from it. In this post, we will see the latest list of datacenter regions for Dynamics 365 Online with the URL for each region. Here is the list of the latest of Dynamics 365 Online data center regions # Region URL 1 North America (NAM) crm.dynamics.com 2 ...

CHANGE USER BUSINESS UNIT WITHOUT REMOVING SECURITY ROLES IN DYNAMICS 365

Image
Since the first versions of the Dynamics 365 product, the business units, users, and security roles are directly linked together and form the base of the security model in the system, where every user must belong to one business unit and must have one or more security roles assigned to him. As you know, security roles are specific to each business unit, where a version of the security role of the root business unit will be replicated and inherited for every business unit in the hierarchy. In addition, changing a user business unit will remove all the security roles assigned to the user from the previous business unit, and you need to reassign them manually for the new business unit. Starting 2021 Release Wave 2 Updates, this behavior can be overridden and we can change the user business unit without removing the assigned security roles . ...

CREATE APPICATION USER FOR DYNAMICS 365

Image
In Dynamics 365, you can create an unlicensed user in your environment, it is called Application user . This type of user will have access to the data of your environment on behalf of the user who is using your application. However, each Azure Active Directory registered application, you can only create one application user. Previously, we were able to create this type of users from the Users area under the Settings > Security menu. Currently, it is done through the Power Platform Admin center In this post, we will see how to Create an Application User for Dynamics 365 . Below are the instructions to create an application user Log on to the Power Platform Admin center as a System Administrator Go to Environments , select the needed environment and open the Settings page ...

CALL JAVASCRIPT FUNCTION ON SUBGRID REFRESH IN DYNAMICS 365

Image
In this post, we will see an example on how to call JavaScript function when a subgrid is refreshed in Dynamics 365 . Sometimes, you have a scenario where you need to call a JavaScript function when a sub-grid refresh event has occurred in the form. The subgrid refresh event might happen if a record is added to the subgrid, deleted from the subgrid, or the refresh button of the subgrid is clicked. In order to trigger the function, you have to register a function on the OnLoad event of the form (in the below exemple manageFormBasedOnRecordsInSubgrid ) which in turns, will call the OnLoad event of the subgrid After doing this, each time you add/delete record from sub-grid, the function functionTriggerredgetOnSubgridRefresh() will be triggered. Below, is a sample code for the function that will ...

TURNING OFF SEND ERROR REPORT IN DYNAMICS 365

Image
In Dynamics 365, when errors occur in the product, users have the option to send error reports to Microsoft about the error. The error report will contain data that can help Microsoft fix these problems and improve the products and services. A pop-up will be displayed to the user that will be able to select the needed option In this post, we will see how to turn off sending error reports to Microsoft . In order to change the error reporting preferences, you can follow the below steps Open the Power Platform admin center and go to Environments In the list of Environments, select the specific environment and open the Settings In the Settings page, under the Product settings section, click Privacy + Security ...

CREATE DYNAMICS 365 ENTITY IN SDK

Image
In this post, we will learn how to create a Dynamics 365 custom entity in SDK and how to set some of its properties. The below function can be used to create a custom entity public void CreateEntity() { CreateEntityRequest createrequest = new CreateEntityRequest { Entity = new EntityMetadata { SchemaName = "cak_CustomEntity", DisplayName = new Label("Custom Entity", 1033), DisplayCollectionName = new Label("Custom Entities", 1033), Description = new Label("Custom entity created using SDK", 1033), OwnershipType = OwnershipTypes.UserOwned, IsActivity = false, IsBusinessProcessEnabled = true, ...

GET THE WEB API URL FOR A DYNAMICS 365 ORGANIZATION

Image
In this quick post, we will see how to get the Web API URL for the Dynamics 365 organization . Go to Settings > Customizations > Developer Resources In the Service Root URL, you will find the API URL You can copy this URL and paste it into a browser to get its result Based on your needs, you can get and use the WebAPI URL in JavaScript using the following line of code formContext.context.getClientUrl() + "/api/data/v9.2/ Hope This Helps!

DUPLICATED WORKFLOWS IN DYNAMICS 365 ADVANCED FIND

Image
In this quick post, I'm gonna share a finding about workflows where you will see Duplicated workflows in the Advanced Find result . Open the Advanced Find and search for a specific process, you will get the result with multiple records with the same name; however, if you go to the All Processes view , you will not find these duplicated records Well, these records are not duplicated records of the workflows. So what are they and how they are created? Each time you deactivate and than reactivate a workflow, a new record will be created with Status Draft , which indicates that a reactivation has been done for the workflow If the workflow is deactivated, the status of all the workflow instances returned in the Advanced Find will be Draft If the workflow is activated, only two...

ERROR DIALOG IN DYNAMICS 365 JAVASCRIPT

Image
In another posts, we saw how to display a Confirm Dialog in Dynamics 365 using JavaScript and how to display an Alert Dialog in Dynamics 365 using JavaScript In this post, we will see how to display an Error Dialog in Dynamics 365 using JavaScript and what are the different properties that can be set. The error dialog will be used to display an error message on the form errorOptions Contains the different dialog display properties: details Contains details about the error. If specified, the user will be able to click the button Download Log File to download a text file that contains the message specified in this op...

ALERT DIALOG IN DYNAMICS 365 JAVASCRIPT

Image
In another post, we saw how to display a Confirm Dialog in Dynamics 365 using JavaScript In this post, we will see how to display an Alert Dialog in Dynamics 365 using JavaScript and what are the different properties that can be set. The alert dialog will be used to display an alert dialog containing a message and a button alertStrings Contains the different dialog display properties: confirmButtonLabel Contains the value that will be displayed for the alert button in the alert dialog. By default it is set to Ok . title Contains the value of the Title that will be displayed in the aler...

CONFIRM DIALOG IN DYNAMICS 365 JAVASCRIPT

Image
In another post, we saw how to display an Alert Dialog in Dynamics 365 using JavaScript In this post, we will see how to display a Confirm Dialog in Dynamics 365 using JavaScript and what are the different properties that can be set. The confirm dialog will be used to display a confirmation dialog containing a message and two button. This dialog will have the below different options confirmStrings Contains the different dialog display properties: confirmButtonLabel Contains the value that will be displayed for the confirm button in the confirmation dialog. By default it is set to Ok . cancelButtonLabel ...

CREATE OR UPDATE (UPSERT) RECORDS USING ALTERNATE KEYS IN DYNAMICS 365 SDK

In another post, we saw how to retrieve a record based on alternate key in Dynamics 365 using the SDK In this post, we will see how to create or update (upsert) a record based on alternate key in Dynamics 365 using the SDK . The below sample code can be used to achieve the UpdateRequest. For the sake of this post, the alternate key is set up on the Account Name (name) field of the account entity. public void UpsertRecordByKey() { KeyAttributeCollection keys = new KeyAttributeCollection { { Account.Fields.Name, "cak account" } }; Account objAccount = new Account(); objAccount.Name = "cak account"; Upse...

RETRIEVE RECORDS USING ALTERNATE KEYS IN DYNAMICS 365 SDK

Image
With Dynamics 365 SDK, you can retrieve a single record by its GUID using the Retrieve method, but, what if you don't have the GUID of the record ? Another approach is to retrieve the record by its alternative keys. However, you cannot use the Retrieve method to do this because it does not have any option to pass the alternate key value. This approach will need the RetrieveRequest to be done. In another post, we saw how to create or update (upsert) a record based on alternate key in Dynamics 365 using the SDK Below, is a sample code on how to retrieve a record based on alternate key in Dynamics 365 using the SDK . For the sake of this post, the alternate key is set up on the Account Name (name) field of the account entity. public void RetrieveRecordB...

CONVERT QUERYEXPRESSION TO FETCHXML AND VICE-VERSA IN DYNAMICS 365

Image
In this quick post, we will see how to convert Query Expression to FetchXML and how to convert FetchXML to Query Expression in Dynamics 365 . QUERY EXPRESSION TO FECTH XML The below function can be used to convert a Query Expression into Fetch Xml query public void ConvertQueryExpressionToFetchXml() { List<Account> lstAccounts = new List<Account>(); QueryExpression qeQuery = new QueryExpression(Account.EntityLogicalName) { ColumnSet = new ColumnSet(Account.Fields.Id), Criteria = new FilterExpression() { FilterOperator = LogicalOperator.And, Conditions = { new ConditionExpression(Account.Fields.StateCod...

DYNAMICS 365 POWER PANE BROWSER EXTENSION

Image
In another series of posts ( Part 1 , Part 2 , Part 3 ), we saw a list of advanced actions that can be performed by the users using the browser extension Level up for Dynamics 365/Power Apps . In this post, we will see another browser extension which is the Dynamics 365 Power Pane and what actions can be done with it. GENERAL USER INFO This option will show some info about the current user such as User Name, what roles the user has, etc... ...