Posts

Showing posts from June, 2021

DYNAMICS 365 CUMULATIVE UPDATE INSTALLATION FAILED WITH ERROR

Usually, installing a cumulative update for Dynamics 365 on premises is easy and does not require deep expertise in order to achieve it. However, you might face errors as happened the last day with one of my colleagues. PROBLEM He informed me that he is not able to install the cumulative update (9.0.23.7) of D365 on premises on one organization. While, he was able to do it on another and both organizations are on the same development server. Therefore, I got the error log and the trace is the following (kept only the interesting part): System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction ---> Microsoft.Crm.CrmException: Error in Action: Microsoft.Crm.SE.DatabaseActions.dll: Execute on attempt 3. System.Reflection.TargetInvocationException : An exception was thrown by the target of a call. ---> Microsoft.Crm.CrmExcepti

DYNAMICS 365 HOW TO FILTER SUBGRID IN JAVASCRIPT

Image
In other posts, we saw how to change the selected view of a subgrid and how to refresh a subgrid in JavaScript. In this post, I will talk about how to filter a subgrid using JavaScript in Dynamics 365 and display the needed records . For the sake of this post, I will take the example of an account record and its related cases that are displayed in a sub-grid component. In the account record, a field called Case Type that contains three options (Problem, Question, Request) Based on the case type selected, the sub-grid should be filtered and show the appropriate cases records To apply a filter on the subgrid, a fetchXml needs to be injected in the sub-grid and filtered based on the case type selected Therefore, go to the Case for

DYNAMICS 365 HOW TO REFRESH SUBGRID IN JAVASCRIPT

Image
In other posts, we saw how to change the selected view of a subgrid and how to filter subgrid in JavaScript. In this post, we will see how to refresh a subgrid in JavaScript in order to show the latest records related to a parent record upon an action on the form or clicking a ribbon button. For the sake of this post, I will take the example of the cases subgrid related to an account record. Let's take the scenario, where an action is done on the client side that adds a case related to the account record. Therefore, the sub-grid should be automatically refreshed to reflect the updated list of cases. In order to do this, a JavaScript function should call the refresh() in order to refresh the subgrid and display the expected result. function refreshSubGrid(context) { var formContext = context.getFormContext();

DYNAMICS 365 HOW TO RETRIEVE AND EXECUTE PREDEFINED QUERIES

As you know, System views are available to all users, while, the Personal views are available to only the users who created them and the users these views are shared with. Both of these are called Predefined queries and can be retrieved and executed using WebAPI. System views are the system defined views and are contained in the entity named SavedQuery Personal views are the personal views and are contained in the entity named UserQuery You can use the following WebAPI calls to execute the predefined queries: System views : https://<OrgUrl>/api/data/v9.0/account?savedQuery=<SystemViewId> Personal views : https://<OrgUrl>/api/data/v9.0/account?userQuery=<PersonalViewId> To get the