Thursday, 28 February 2019

Microsoft Dynamic CRM frequently asked Interview questions

1. What is the Entity Relationship Behavior?

2. Plugin Development Steps for MSCRM?


3. Explain the Plugin Vs Workflow in MSCRM?


4. Explain the Sales module Life Cycle in MSCRM ?


5. Explain the Users and Teams in MSCRm?


6. What are the actions in MSCRM?


7. What is Access Team and explain how to enable access teams in MSCRM?


8. What is the Plugin Constructor ?


9. Explain the POWER BI integration for On Premise and Online version of MSCRM?


10. Explain the all modules life cycles in outbox Mscrm?


11. Explain all about mscrm portals ?


12. What is the execution order of Javacript, workflow and plugin in mscrm?


13. What is Depth? How to use it?


14. What is Maximum Depth?


15. What is Scope in Business Rules?


16. What is secured and unsecured  configurations plugin?


17. What is access levels?


18. What is Query Expression?


19. What is QueryByAttribute and Fetch expression?


20. What are the shared variables?


21. What is unisolated plugin?


22. Explain Owner Teams vs Access Teams?


23. Maximum how many records we can get through 'Retrieve Multiple' ?


24. What are the filtered views?


25. Early Binding and Late Binding?


26. What is SLA?


27. Explain How to Roll Back Managed and Unmanaged solutions?


28. Explain 1-N, N-1, N-N relationships with example of outbox entities in MSCRM?


29. What are the shared variables in plugin?


30. What is the Sandbox mode in Plugin?


31. What is the difference between Plugin and Custom Workflow?


32. What is Pre-Image and Post-Image?


33. Explain  O-Data and Web Api in MSCRM?


34. Explain Plugin Execution Pipe Line pre-validation, pre-operation and post-operation?


35. How can we sort the order of  5 plugins?


36. SSRS and SSIS in MSCRM?


37. Have you worked on any Data Migration Projects?


38. Explain Actions, Access Teams and Busniess Process Flows?


39. Plugin Event Messages?


40.Understanding Access Levels  and Roles in MSCRM?


41. What is the Security Model in MSCRM?

Early Vs Late binding in Dynamics CRM

Ref: https://dynamics-crm.blog/2017/05/05/early-vs-late-binding-in-dynamic-crm/

While working on plugins and custom workflow, We encounter a problem that we need extract data from existing and custom entity. There are two ways to do this job one is Early binding and another is late binding. Let’s see how we can do that.
  1. Early Binding
  2. Late Binding
Early Binding 
By Early binding, we mean that we generate domain class objects first and then assign data to these domains class objects is known as Early Binding.
How to generate Entities.cs class using XRM Tool
Download XRM Tool Box. http://www.xrmtoolbox.com/
Connect to CRM Connection.
Pics
Go to EarlyBoundGenerator
Pics
If Not installed please install from plugin store.
Just click Create Entities
Pics
Once entities are created you need to push this file into your workspace. Once added they can be used to initialize that entity and pass data in that entity object.
Late Binding in dynamic CRM
No need to generate helper classes and at runtime all type checking will be done operations and type checking will be performed at run time itself.

Pics
You can find further code at following location
Thanks for reading …..

Tuesday, 26 February 2019

How to Create Dynamics 365 SSRS Report

https://readyxrm.blog/2018/07/24/how-to-create-your-first-dynamics-365-ssrs-report/


Summary

  • SQL Server Reporting Services reports are a viable way to generate information from your Dynamics 365 system.
  • The Dynamics 365 Report Wizard has limitations in terms of the reports that can be created.
  • Creating SSRS Reports does not necessarily require deep development skills.
This post outlines the steps to create a simple SSRS report integrated and connected to Dynamics 365 without using the Dynamics 365 Report Wizard.

Dynamics 365 SQL Server Reports

Dynamics 365 Sales and Service Apps come with a set of reports out of the box.  In my experience, these reports are not often used and in most cases, there is a need for custom reports.
The Dynamics 365 report wizard can create simple list based reports based on one or two related entities, has some basic charting abilities, but has limits on flexibility.
With some basic knowledge, you can create custom SSRS reports for Dynamics 365 very quickly.







wizard_lego
Become your own Report Wizard!

SSRS reports are created using SQL Server Data Tools, which is a version of Visual Studio specific for creating database related projects.  The fact that Visual Studio is used does NOT mean that the report author needs to be a developer or coder to create powerful reports.
Before starting, please review my post on setting up your workstation to create SQL Server Reports for Dynamics 365.
Once you have your workstation ready, you will also need some level of access to your Dynamics 365 system.  Note that these steps could also be used to create custom reports for a Common Data Service Model-driven PowerApp.

Creating your First SSRS Report

To create reports, you first need to launch SQL Server Data Tools
ssdtdl8
This will launch Visual Studio.  Again, you don’t need to be a developer to use this tool!







assdt16
Visual Studio SQL Server Data Tools

Click on File -> New -> Project
assdt17
The New Project Dialog will appear.
From the Templates, choose Business Intelligence -> Reporting Services and select Report Server Project.
assdt18
Once that is loaded, from the Solution Explorer on the right-hand side, right click on the Reports folder, choose Add -> New Item
assdt19
Choose to create a Report file and give it a name.  The “RDL” extension stands for “Report Definition Language” which is an XML interpretation of the report you will create.
assdt20
The report design surface will appear.







assdt21
Report Designer

The first step is to create a link to your Dynamics 365 system.  On the left of the report designer window, in the Report Data section, right click on the Data Sources folder and click “Add Data Source”.
assdt22
If the Report Authoring extensions were installed correctly, you should see “Microsoft Dynamics 365 Fetch” as a type.  For Dynamics 365 On-Premise, you do have the option to create T-SQL based reports, but to future proof your reports, you should consider writing in FetchXML where you can.
Provide the Data Source with a name and enter in your URL for your Dynamics 365 system.
assdt23
Click on credentials and enter in your Dynamics 365 login and password.  Note that these will not be “carried” with the report, but just used in the designer.  When we eventually load the report in Dynamics 365 it will run in the context of the logged in user (and applicable security roles will apply)
assdt24
We need to add a Dataset to pull data from Dynamics 365.  We will be using a query language called “FetchXML”.
While you could construct a FetchXML by hand, it is easier to generate using a tool.
One quick way to get a FetchXML query is from Dynamics 365 Advanced Find.
Directly in Dynamics 365, simply build an Advanced Find query, and then choose the “Download FetchXML” button.  An XML file containing the query will be downloaded.
assdt26
Looking at the FetchXML file, you can see the structure identifying the entity, the fields and filters.
assdt27
If you want to create advanced FetchXML queries, I suggest using the XrmToolBox  plug-in “FetchXML Builder” by MVP Jonas Rapp.







fetchxml
Must Have Tool for Dynamics 365 Report Development

Again on the Report Data section, right click on the Datasets folder and choose “Add Dataset”
assdt25
Provide a name, choose to use the embedded dataset that we created earlier and paste in the FetchXML statement.
assdt28
You should now see a dataset in the Report Data section.
assdt29
For the first report, we will just drag a “table” component onto the design surface.
assdt30
The table will automatically bind itself to the dataset we created earlier, from here we can define what fields we want to appear on our report.
assdt31
Once we have defined our layout (pretty simple at this point) we can click the “Preview” button to see what our report will look like.
assdt32
Now that we have our “fancy” report created, lets load it to Dynamics 365!

Loading the Report to Dynamics 365

Login to Dynamics 365 and choose Sales or Service and click on the Reports icon.
Note: If you using a CDS environment with no Dynamics 365 First Party Apps installed, you can find the reports via the Advanced Find or add the Report Button to a Site Map.







assdt33
Dynamics 365

You will see the list of out of the box reports.  Click on the +NEW button to add your new report.
assdt34
Change the Report Type to “Existing File”.
Click the Choose File and navigate to the directory where you created the report project in Visual Studio, locate and choose the “rdl” file.  To have the report appear on the menu within the context of certain entities, you can set them in the “Related Record Types” and indicate for them to show up on the report area, forms and lists.  In a future post I will expand upon running reports agains specific Dynamics 365 records (e.g. running a quote report against a specific quote record).
assdt35
The report should now appear on the list of available reports.  Double click the report to run.
assdt36
You should now see your report rendered within the context of Dynamics 365.  You can now print or download to a variety of formats.







assdt37
Super fancy SSRS Report generated directly in Dynamics 365

Next Steps

The report we created was pretty simple and frankly, quite ugly.  In SQL Server Data Tools, we can clean up the report and have specific formatting, totals, logos, sections, etc.  and create a pixel perfect rendering of our data.
Creating SSRS reports for Dynamics 365 is not difficult once you understand the basics.  I hope you find this post useful and I look forward to hearing about the amazing reports you have created.


Saturday, 23 February 2019

How to debug a plugin in Dynamics 365 online using plugin profiler

Ref: https://dynamics365blocks.wordpress.com/2016/12/06/how-to-debug-a-plugin-in-dynamics-365-online-using-plugin-profiler/

How to debug a plugin in Dynamics 365 online using plugin profiler
In this post we’ll learn how one can debug a plugin code in Dynamics 365 online or Dynamics CRM online environment.
What you need is dynamics 365 SDK which ou can download from here.
Below is the Step by Step procedure to debug a plugin in Dynaamics 365/Dynamics CRM online:
Step 1: Download and extract Dynamics 365 SDK  in any folder.
Step 2: Now navigate to SDK\Tools\PluginRegistration
Here you’ll see pluginRegistration.exe file.

Double click on it and create a new connection.by clicking “Create New Connection”
1
Step 3: Click on login. It’ll ask for credentials.
Provide your dynamics 365 username and password and click sign in.2.PNG
Step 4: Now it’ll display the available instances of your organization.
Select the one in which your plugin exist you want to debug.
It’ll display the list of existing assembly deployed in that  instance.

Step 5: Click on install profiler button on top ribbon of Plugin Registration tool.
3.PNG
Once it’s done, it’ll look like this:
4.PNG
Also a solution is created in Dynamics CRM instance as shown below:
5.PNG

Step 6: Now select the step you want to debug in plugin registration tool and click Start Profiling.6
Click ok in next window:
7.PNG
As you click OK,the plugin step is updated as below:
8.PNG
Step 7: Now perform the operation on which the above step has been registered.
It’ll generate an exception and a log file which you need to download and save.
It’ll be used in step 9.
Step 8:  Now open the plugin solution in Visual studio and Add the breakpoint  in plugin code from where you would like to debug.
Now click on debug and then click attach to process.
Below window will pop up where you need to select PluginRegistration.exe adn click on attach:
9.PNG
Step 9: Now click on debug in plugin registration tool as shown below:
10.PNG
Now below window will open where you need to select the log file downloaded in step 7 in Profile, specify plugin dll assembly location in Assembly location and select the step in Plugin as shown in below image and click “Start Execution“:
11.PNG
Step 10: As soon as you click on Start Execution, the debugger stops at the breakpoint inserted in code in step 8 as shown in below screenshot:
12.PNG

Now you can debug the code line by line further by pressing F10.

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...