Friday, 10 January 2014

CRM 2011 Interview Questions

What is CRM Service of MSCRM?
CRM Service is the main web service and it exposes Six methods such that you can write your code against CRM entities. To perform operation other than the six operations (six methods provided by mscrm) we will have to use the Execute method.


What is Metadata service of MSCRM.

Dictionary meaning of the word METADATA is data about data and similarly the metadata holds the information about MSCRM means the information about the entity and 

attribute e.g. Display name, platform name, size of the attribute, datatype of attribute etc. If we want to access any information about any entity (Dynamic or system) 


we will have to make use of the Metadata service. In the database we can find the metadata table and name of these table begins with keyword Metadata.


What is discovery Service?

The Discovery service is a global service that helps the caller to detemine the correct organization and URL. Microsoft CRM server may include several servers. Each 

server might be dedicated to multiple organization. Each of these servers will have dedicated web-service URL for faster operations. Internally the Microsoft CRM 


server allocation may change so the discovery service directs the request to its corresponding web-server for further processing.


Explain some new features in MS CRM 2011.

There are many new featues in MS CRM 2011 like Enhanced UI,OOB Dashboard support,Auditing support,Field level security, Connections,Solution, Webresource , Role based Forms.

http://www.dynamicsexchange.com/CRM-2011/New-in-CRM-2011.aspx


What is Solution?

Solution is a collection of MS CRM 2011 components that can be exported and imported easily from one CRM organization to another CRM organization.

What are the different webservice available in MS CRM 2011.

MS CRM 2011 have two webservices IOrganization Service, IDiscoveryService

Which service can be used to access metadata information.

We can use IOrganization Service to fetch metadata.

What are the different ways to consume MS CRM webservice from client side?

We can write Rest or Soap request to consume MS CRM 2011 webservices.


Difference between Managed and unmanaged solution.

Managed solution can’t be customized, but can be uninstalled easily.
Unmanaged solution can be customized, you can’t uninstall unmanaged solution.
http://msdn.microsoft.com/en-us/library/gg334576.aspx

Is it possible to register plugin through solution?

Yes.

What is field level security?

Using field level security we can hide information based on user security role in MS CRM 2011. 
Refer: http://msdn.microsoft.com/en-us/library/gg309608.aspx

How can we use auditing in MS CRM 2011.

Auditing can be configured easily through CRM UI. 
Refer: http://www.avanadeblog.com/xrm/2010/09/crm-2011-feature-of-the-week-9132010-auditing.html

What is the use of document location entity in MS CRM 2011.

Document location entity is used to store location of crm record which point to a document folder in share point.

How can we create a custom Ribbon button.

To create a custom ribbon button we need to modify RibbonDiffXml of the entity where want to place our button. We can use different ribbon editor tool in codeplex or can manually modify it, you can refer my post to create custom ribbon button.

How can we rename a system Ribbon button.

We can do this by modifying ribbondiffxml, but we need to get current ribbon button id, that we can get from the sample ribbon generator application that comes with Microsoft CRM 2011 SDK.

How can we open a custom webpage from ribbon button.

We can use Action to open custom page
Refer: http://msdn.microsoft.com/en-us/library/gg328038

How can we use Filtered views in MS CRM 2011.

Filtered view is a way to enforce security as database level, while working with report we use Filtered view to fetch data based on user security role. Microsoft CRM 2011 contains filtered view for every entity.

What is Webresource and what the different types of webresource.

Web resource is new feature in Microsoft CRM 2011, which is used create reusability of the code and other component. We can create different type of web resource in Microsoft CRM 2011 for example javascript, Image, silverlight, CSS and HTML page.

How can deploy a Silverlight webresource in MS CRM 2011.

Refer:  http://msdn.microsoft.com/en-us/library/gg328358.aspx

What is the use of subgrids?

Subgrids are used to display any entity view in another entity, you can add subgrids from Insert tab while customizing entity form and can select entity to display view in that subgrid

What are the basic steps involved in developing plugin.

Refer : http://msdn.microsoft.com/en-us/library/gg328490.aspx

What is the use of tracing Service in plugin development.

This is a new feature in Microsoft CRM 2011, using tracing service we can get more error details and can display them to user.

What are the new messages introduced for plugins in MS CRM 2011?

Microsoft CRM 2011 has introduced many new entities, you can refer new entity and their messages in “message-entity support for plug-ins” files that comes with Microsoft CRM 2011 SDK.

What is sandbox plugin.

Sandbox plugin is a plugin which runs under Isolation mode. All Microsoft CRM 2011 plugin writing for online is registered in sandbox mode.

What are the different ways to create custom report for MS CRM 2011.

Fetchxml and SSRS.

Difference between Early bound and late bound.

Early bound – Easy to code, you don’t need to remember field’s name, compile type checking, required extra efforts to generate early bound classes.
Out bound- you should know fields name, run time checking, performance wise better than early bound.
Refer: http://msdn.microsoft.com/en-us/library/gg327971.aspx

Friday, 3 January 2014

CRM 2011 Debugging Plugins


Debugging Plugins :
After a plugin has been registered properly in a development setting, generally
you want to work through debugging. Debugging a CRM on-premise solution
is similar to debugging any ASP.NET application. And it requires fewer steps than debugging CRM Online. Debugging Online can be more time-consuming and therefore requires more thought and care in development. The following sections outline how to debug in both environments.


Debugging CRM On-premise Solutions:
 When debugging on-premise, you can use Visual Studio to attach to a process
and step through the code. The following steps are all that’s required:


1. Make sure that the DLL and PDB that are built with your Visual Studio
solution are current, and that the current builds of both are in the server/bin
folder of your on-premise CRM installation folder. You need to register the
plugins using the Plugin Registration tool prior to taking any further steps.


2. Click the Debug menu option in Visual Studio and select Attach to Process. You want to attach to all instances of w3wp.exe listed in the Available Processes panel.

Note When debugging workflow activities, you need to attach to the
CrmAsyncService process in the Available Processes panel (w3wp.exe is the
process to attach to for plugin debugging).


Note When debugging on a remote server, you need to use the Visual
Studio Remote Debugger and configure Visual Studio to connect to the target
machine.


Debugging CRM Online Plugins
CRM Online can’t be debugged in the same way as CRM on-premise because
there is no way to attach the Visual Studio environment directly to CRM Online.
Instead, you need to take several steps to allow for debugging. This section describes those steps.



Installing the Profiler
The first step to debugging in the CRM Online environment is to install the profiler.You do that by opening the Plugin Registration tool and connecting to the instance that has the plugin you want to debug. Click the Install Profiler button on the menu bar.





 Note To uninstall the profiler, make sure you click the Uninstall Profiler button
in the Plugin Registration tool. If you simply unregister it (as you would anything else registered), you’ll leave a lot of pieces installed and will have some additional cleanup work to do.


Profiling a Step:
With the profiler installed, the next step is to right-click the step within a plugin
that you want to debug and select the Start Profiling option. In the Profiler Settings, you can set various properties. You can generally use the default settings here and simply click OK. Once a step has been configured with
the profiler. You can add profiling to as many steps as you need to
successfully debug your code.





Triggering the Profiler and Saving the Log File:
Now that the step is successfully profiled, you need to trigger the code behind
the step to execute. Go into the CRM Online front end and force the action to occur that will trigger the step (for example, if the step is on the loss of an opportunity,go into an opportunity and click Lost Opportunity). When the code is hit, an error similar to that shown in image will pop up. Click the Download Log File button and save it.



Debugging, Attaching, and Breakpoints:
Back in the Plugin Registration tool, click the Debug button (on the menu, next
to the Uninstall Profiler button). Set the Profile Location property to the local path where you downloaded the log file. The Assembly Location property should be the local path where the assembly DLL and PDB files are located. Make sure that this is the same build that the Visual Studio code you’ll be debugging is associated with.



Open your plugin code in Visual Studio and set breakpoints where appropriate.
You should start by putting a breakpoint on the first piece of code that will execute when triggered, so that you can ensure all your code is firing as expected.


Studio and select Attach to Process. In the Available Processes panel, highlight the pluginregistration.exe process and click the Attach button.

Finally, once everything is attached in Visual Studio, click the Start Execution
button in the Debug Existing Plug-in tool.You will now be able to step through your code.