Monday, 29 November 2021

How to use Form Component Control to Edit Related Entity Information in Dynamics 365 CRM

In the recent release of the Dynamics 365 CRM, new features have been added. One of the most important and useful features among these is the feature to see and edit data of the related entity on the main form using the “Form Component Control”.

A feature like this is useful in many ways, for example, if a salesperson is working on the Opportunity record and they want to change some related information of a customer then they can do it on the same form itself. Previously, if the same salesperson wanted to edit the information of the customer, they needed to open records of the customer and then change the information. This was not efficient, previously with the help of Quick View Form we could see the data of related records but now using Form Component Control they can edit information of related entity records.

We can edit the related record information within the same form, by following the below steps:

Go to Customizations  -> Customize the System -> go to Opportunity entity -> open Opportunity form and select account lookup field -> click on change properties. Once we click on change properties, it will open the following window



Go to the Controls tab and select the Form Component Control as shown below.



Once we select Form Component Control, it will look like the screenshot shown below.



To set properties click on the edit icon as shown in the above screenshot.

Once we click on the edit icon, it will open a window, select “Bind to a static value” option andthen enter value inthe text box in the below format.

<QuickForms><QuickFormIds><QuickFormId entityname={Entity logicalname}>{FormId}</QuickFormId></QuickFormIds></QuickForms>

As we want to edit customer (account) information on opportunity, we have to select entity name as account and account entity form ID,you can select any entity form ID.

<QuickForms><QuickFormIds><QuickFormId entityname=“account”>C9E7EC2D-EFCA-4E4C-B3E3-F63C4BBA5E4B</QuickFormId></QuickFormIds></QuickForms>



Once we set the properties value and click on Ok, save and publish the form. Once we publish, we are ready to see and edit customer (account) information on the opportunity form as shown below. We can see the first tab of the account form, all scripts added on account form and business rule are executed.


Conclusion

With the help of Form Component Control we can easily edit related information on the main form.

Tuesday, 16 March 2021

Power Apps Community Plan: a free development environment for individual use

 Now you can create a developer instance for learning and creating power apps. It will not expire unlike a trail instance.

Use the below link to know more about this.

https://docs.microsoft.com/en-us/powerapps/maker/dev-community-plan

Use the below link to create your developer instance.

https://powerapps.microsoft.com/en-us/communityplan/


Sunday, 7 February 2021

What is Secure Vs Unsecure configuration of plugin in Dynamics 365 CRM

 While developing plugin for Microsoft Dynamics CRM, there are some scenarios where you required an input parameters or a configuration for the plugin execution which can be easily updated without having to re-compile or re-registering the plugin.


When you register a plugin step, there are fields where you can specify configuration parameters for the plugin execution.

In Microsoft Dynamics CRM there are two types of different configurations fields are available for plugin-

        1.       Unsecure configuration.
        2.       Secure configuration.

The main difference between these two settings is that, secure configuration is only viewable by CRM Administrators while the unsecure configuration is viewable by any CRM user. 

Another major difference is- the unsecure configuration will automatically move between environments with your CRM solutions.

How to use the plugin step configuration:

While registering the new step in plugin you can provide the configuration data with the Secured or Unsecured fields as show in the below screenshot-






When you provide the configuration details in XML format in the constructor of your plugin class you will get the configuration value which you can use later in the execution method.

Wednesday, 3 February 2021

How to prevent record from saving in Dynamics CRM using Javascript

 From time to time you might need to add some validation to the save event of an entity, this actually used to be an approach I would use on a regular basis but since the introduction of business rules have found myself doing this less and less. But still, knowing the ability is available is handy.

When you define the onsave event function, you must tick the “Pass execution contact as first parameter” option. (See below)



Having done that you can create an onSave function with code similar to the example I have shown below. Note forgetting the “(context)”, which will take the context parameter allowing you to prevent the save when needed.

function onSave(context) {
  var saveEvent = context.getEventArgs();
  if (Xrm.Page.getAttribute("telephone1").getValue() == null) {
    // *** Note: I am using an alert for testing a notification maybe better!
    alert("Put in a phone number!");
    saveEvent.preventDefault();
  }
}

Note: This simple example might be better achieved with a business rule but when you need complex validation that can’t be implemented with a business rule this approach is usefil.

Happy Code! J


Dynamics 365 CRM Interview Questions 2021

 1. What is filtered view?

2. Difference between secure and unsecure configuration?

3. What is Depth Variable, explain any scenario in Realtime usage of depth?

4. Power Portals, Power Bi, Logic Apps, Power Bi, Power Automate related questions?

5. What are actions in CRM?

6. How did you do the release management?

7. Plugin and Workflows in CRM?

8. Business rules in CRM?

9. What are Roll up and Calculated fields?

10. What is business process flows and how we can apply security on it?

11. How to create reports in SSRS? 

 

How to use Form Component Control to Edit Related Entity Information in Dynamics 365 CRM

In the recent release of the Dynamics 365 CRM, new features have been added. One of the most important and useful features among these is th...