Dynamics 365 – Different Ways of Showing Form Level Error Messages – setFormNotification | setIsValid

Form notifications are useful when you want to prevent the user saving the form if the form fields do not meet the conditions. Say you have 2 date fields called "Start Date" and "End Date". You want the records can only be saved if the "End Date" is bigger than the "Start Date". You have … Continue reading Dynamics 365 – Different Ways of Showing Form Level Error Messages – setFormNotification | setIsValid

Dynamics 365 – How to get and use formContext

The formContext is a part of executionContext and it replaces deprecated Xrm.Page starting from Version 9. Xrm.Page object was used to represent a form or an item on the form. With the latest version, the Xrm.Page object is deprecated, and you should use the getFormContext method of the passed in execution context object to return reference to the appropriate form or … Continue reading Dynamics 365 – How to get and use formContext

Dynamics 365 – How to Trigger OnChange Event of an Attribute

fireOnChange() function is used to trigger the registered onChange events of an attribute. It is also very useful when you update an attribute through Javascript Code and it onChange event doesn't trigger. When you update an attribute from Javascript code, its onChange event doesn't trigger. If you want it to be triggered, you have to … Continue reading Dynamics 365 – How to Trigger OnChange Event of an Attribute

Dynamics 365 – How to Customize Opportunity Close Form

Before you customize the Opportunity Close form, you need to enable the customization of Opportunity Close form from System Settings. To do that open your Advanced Settings page. Go System > Administration > System Settings. Under Sales tab enable the Customize close opportunity form. Once you enable it, users will start seeing the Quick Create … Continue reading Dynamics 365 – How to Customize Opportunity Close Form

Dynamics 365 – Hide/Show Custom Ribbon Button by Ribbon Workbench

If you have a custom ribbon button and you want to hide/show it by a condition, this is what you need to do; Open Ribbon Workbench and navigate to your button Select Command of your button. Under Command properties scroll down to Enable Rules. Click "Add Enable Rule" button. Select "Add New Enable Rule" to … Continue reading Dynamics 365 – Hide/Show Custom Ribbon Button by Ribbon Workbench

Dynamics 365 Best Practices – Web resource dependencies

Web resources are one of the most important and crucial feature of Dynamics 365. It allows you to extend form customizations, the Sitemap, business logic, ribbon buttons and so on.. You usually refer to the controls(attributes) from Web resources to change their values, validate fields, trigger some events. But if at least one of those fields … Continue reading Dynamics 365 Best Practices – Web resource dependencies

Query Dynamics 365 CDS Data with SQL

SQL 4 CDS tool allows you to use standard SQL syntax to query and manipulate your data and metadata in Dataverse. You can add SQL 4 CDS to your XrmToolbox and start using it within your CRM data. With SQL 4 CDS queries are converted to FetchXML where possible, allowing you to generate FetchXML queries … Continue reading Query Dynamics 365 CDS Data with SQL

Dynamics 365 ExecuteMultipleRequest

In Dynamics 365, we can use ExecuteMultipleRequest message to execute multiple requests at once as bulk. There are times that you need to update multiple records that fits a condition, creating new records for a new business request or deleting records. The first thing comes in your mind would be, put all the records inside … Continue reading Dynamics 365 ExecuteMultipleRequest

Dynamics 365 Workflow Activity- Add Selected User To a Team by a Workflow(AddMembersTeamRequest)

To add an user to a Team, use the below code to create a Custom WorkflowActivity. Deploy it and use it in your desired Workflows as workflow step. public class AddSelectedUserToTeam : CodeActivity { [RequiredArgument] [Input("User")] [ReferenceTarget("systemuser")] public InArgument<EntityReference> User { get; set; } [RequiredArgument] [Input("Team")] [ReferenceTarget("team")] public InArgument<EntityReference> Team { get; set; } #region … Continue reading Dynamics 365 Workflow Activity- Add Selected User To a Team by a Workflow(AddMembersTeamRequest)

Dynamics 365 Workflow Activity- Send Email to Team Members by a Workflow(Add Team Users to the Email Recipients)

In Dynamics 365, you can't send E-mail to the team members out of box. But workaround for this is easy. First you create your Email in Workflow by using out of box Create Record step.If you have any "To" or "CC" users other than team members, you add those users to the e-mail in first … Continue reading Dynamics 365 Workflow Activity- Send Email to Team Members by a Workflow(Add Team Users to the Email Recipients)