Monday, August 15, 2016

CRM Interview Question and Answers Part 2

Extra CRM Interview Questions
1) What is the importance of child Pipeline in Plugins ?
Ans:  In CRM 4.0, Plugins registered in Parent Pipeline would trigger when a record is created by UI or say through SDK calls from your program. Child Pipeline is triggered when the event was triggered by the platform in the process of performing some other operation rather than direct calls from CRM UI or SDK Calls.
An example would be the Order that is auto-created from the Quote using CRM UI. That auto creates the Order and Line items, if you need to capture this event, you
would need to register the plugin in child pipeline.
Parent Child Pipeline concept is no longer available in CRM 2011.However, you can still achieve the same by following the below mapping.
CRM 4.0                                       CRM 2011
Pre Stage – Parent Pipeline            Pre-Validation
Pre Stage – Child Pipeline              Pre-Operation
Post Stage – Parent Pipeline          Deprecated. Not available in CRM 2011
Post Stage – Child Pipeline            Post-Operation
2) What is SQL Profiler ?
Ans : SQL Server Profiler is a is a graphical tool and a rich interface to create and manage traces and analyze and replay trace results. The events are saved in a
trace file that can later be analyzed or used to replay a specific series of steps when trying to diagnose a problem.
3) What is WWF ?
Ans : Windows Workflow Foundation(WWF) is used to create applications that execute an ordered business process, such as the steps needed to approve a document, hire a
candidate for a position, or make a purchase.
Scheduling and executing workflows and activities
Managing the flow of execution between activities.
Managing data for executing activities. A built-in tracking provider that records built-in Workflow events (such as an activity starting, completing, or faulting), or
custom events (such as a custom activity tracking application-specific data).
Providing visual debugging capabilities using the workflow designer
4)  How can you achieve load balancing for MSCRM server like two MS crm application server and one database server?
Ans: High availability and load balancing are achieved at the application tier by implementing Windows Network Load Balancing (NLB) or a Hardware Load Balancer. High availability is achieved at the data tier by implementing a SQL Server Active/Passive cluster
5) What are one way or two way contract in wcf ?
Ans : A contract that allows clients and servers to communicate with each other independently so that either can initiate calls to the other is called as Duplex
Contract. The duplex contract is one of three message patterns available to Windows Communication Foundation (WCF) services, other two being One Way Contract and Request-Reply Contract.
6) What are object based securities and role based securities in MS CRM?
Ans:Users are assigned one or more roles based on their job function or tasks.Roles are associated with permissions (privileges and access levels) for the different business objects (entities).Users gain access to entities or groups of entities in the system via membership in a role that has been assigned the necessary privileges and access levels to perform the users’ jobs. Object-based security in Microsoft Dynamics CRM focuses on how users gain access to individual instances of business objects (entities).
Role-based Security
Role-based security in Microsoft Dynamics CRM is based on the interaction of privileges and access levels, which work together through the use of security roles.
Privileges define what actions a user can perform on each entity in Microsoft Dynamics CRM. Privileges are pre-defined in Microsoft Dynamics CRM and cannot be changed.Examples of privileges include Create, Read, Write, and Delete. Access levels indicate which records associated with each entity the user can perform actions upon.The access level associated with a privilege determines (for a given entity type) the levels within the organizational hierarchy (User, team and Business Unit) at which a user belonging to a specific role can act on that type of entity.Each security role provides a combination of privileges and access levels specific to a Microsoft Dynamics CRM job function.
Object-based Security
Object-based security applies to individual instances of entities and is provided by using access rights. An access right is granted to a user for a particular entity instance. The relationship between an access right and a privilege is that access rights apply only after privileges have taken effect. For example, if users do not have the
privilege to read accounts, they will be unable to read any account, regardless of the access rights another user might grant them to a specific account through sharing.
7) How to improve the performance of MSCRM integrated with custom web Application ,how you find that this particular layer you have to do some thing to improve the performance?
Ans : Balanced Data Distributor (BDD) component improves the data load performance by taking advantage of the multi-threading capability of SSIS engine.
You should carefully choose a right number of the outputs for BDD component. It’s not the case that the more the better. Depending on your servers’ capacity (including processor, memory, IO system) and the network latency between your client system and CRM server, it could be 3, 5, 10, or something else for the maximized performance, which you may find out by running different tests. There are many ways that you can use to improve the data load performance, BDD is just one of the easy ways that make the data load faster.
8) What are the thing that exactly comes under unsupported customization?
Ans : The following is a list of the types of actions that are not supported:
Modifications to any .aspx, .css, .htm, .js, .xml, .jpg, or .gif files or addition of files in the wwwroot directories of the Microsoft Dynamics CRM application, Microsoft Dynamics CRM tools or Microsoft Dynamics CRM files located at Program Files\Microsoft Dynamics CRM. During upgrades and updates, these files are not checked
for modifications and might be overwritten.
Modifications to the Microsoft Dynamics CRM Web site (file and Web site settings). Custom solutions should be installed in a different Web site. This includes
modifications to the file system access control lists (ACLs) of any files on the Microsoft Dynamics CRM server.
Modifications to the physical schema of the database, other than adding or updating indexes. This includes any actions performed against the database without going through System Customization.
Modifying tables, stored procedures, or views in the database is not supported. Adding tables, stored procedures, or views to the database is also not supported because of referential integrity or upgrade issues. Note   This applies to all Microsoft Dynamics CRM databases and the Microsoft Dynamics CRM for Microsoft Office Outlook local database.
9) How to create a 1:1 relationship in MsCRM , mean how from a front end does there a Link to do that?
Ans : It is not possible in MS CRM 4. But you can do something like this.
Create a 1:N relationship between Entity A & Entity B
a) On Entity A, You will have a left navigation pane where you can add more than one Entity B (instances), Now you have to hide it, it is pretty straight fwd. document.getElementById(“navEntitiesB”).style.display = “none”
b) On Entity B, Add the lookup field, This lookup Field means only 1 record from A can be associated with B, thats’ it, now you have restricted B to be added against only one A and on A you have hidden the possiblity of adding entites instances.
10) Explain some new features in MS CRM 2011.
Ans : 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
Refer:
http://msdn.microsoft.com/en-us/library/gg309589.aspx
11) What are the different webservice available in MS CRM 2011.
Ans : MS CRM 2011 have two webservices IOrganization Service, IDiscoveryService
12) Which service can be used to access metadata information.
Ans : We can use IOrganization Service to fetch metadata in 2011 and metadata service in 4.0. Metadata 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.
13) What are the different ways to consume MS CRM webservice from client side?
Ans : We can write Rest or Soap request to consume MS CRM 2011 webservices.
14) Rest Vs Soap.
Ans : SOAP and REST are both web services to access and modify / manipulate CRM data.
REST(ODATA) : It is the recommended web service to use for tasks that involve creating, retrieving,
updating and deleting records. However, in this release of Microsoft Dynamics CRM the
capabilities of this Web service are limited to these actions
SOAP: Unlike the REST ENDPOINT, the SOAP endpoint uses the Organization service. This is
the same service used when writing applications that exist outside of the Microsoft Dynamics
CRM 2011 and Microsoft Dynamics CRM Online application.The SOAP endpoint provides
access to all the messages defined in the Organization service. Soap is recommended for
Assign, Retrieve and Execute
XmlHttpRequest:  (sometimes referred to as XHR) provides capabilities to configure and send
requests and define a callback function if the request is asynchronous. The HTTP response from
the server includes a status code indicating whether the request was successful. HTTP status
code values in the 200 range are considered successful.
An XmlHttpRequest provides instructions to the server about the format of any data to be included in
the response. Because the REST endpoint supports both ATOM and JSON formats you have the
option to request data to be returned in the XML ATOM format. However, with JScript code the expected
typical request will use JSON because it is easily consumable using JScript.
15) Difference between Dialog and Workflow.
Ans :
16) What is Solution?
Ans : Solution is a collection of MS CRM 2011 components that can be exported and imported easily from one CRM organization to another CRM organization.
17) Difference between Managed and unmanaged solution.
Ans : Managed solution can’t be customized, but can be uninstalled easily.Unmanaged solution can be customized, you can’t uninstall unmanaged solution.
Refer : 
http://msdn.microsoft.com/en-us/library/gg334576.aspx for more details
18) Is it possible to register plugin through solution?
Ans : Yes.
19) What is field level security?
Ans : 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
20) How can we use auditing in MS CRM 2011?
Ans : 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 for more details on auditing.
21) What is the use of document location entity in MS CRM 2011.
Ans : Document location entity is used to store location of crm record which point to a document folder in share point.
22) How can we create a custom Ribbon button ?
Ans : 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.
23) How can we rename a system Ribbon button ?
Ans : 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.
24) How can we open a custom webpage from ribbon button ?
Ans : We can use Action to open custom page
Refer:  
http://msdn.microsoft.com/en-us/library/gg328038
25) How can we use Filtered views in MS CRM 2011 ?
Ans : 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.
26) What is Webresource and what the different types of webresource ?
Ans : 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.
27) How can deploy a Silverlight webresource in MS CRM 2011 ?
28) What is the use of subgrids?
Ans : 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
29) What are the basic steps involved in developing plugin ?
30) What is the use of tracing Service in plugin development ?
Ans :This is a new feature in Microsoft CRM 2011, using tracing service we can get more error details and can display them to user.
31) What are the new messages introduced for plugins in MS CRM 2011?
Ans :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.
32) What is sandbox plugin ?
Ans :Sandbox plugin is a plugin which runs under Isolation mode. All Microsoft CRM 2011 plugin writing for online is registered in sandbox mode.
33) What are the different ways to create custom report for MS CRM 2011 ?
Ans : Fetchxml and SSRS.
34) Difference between Early bound and late bound ?
Ans :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.
o Out bound- you should know fields name, run time checking, performance wise better than early bound.
35) What is plugin impersonation?
Ans. Through plugin impersonation, plugin in executed with callers(user who performs operation) identity. To enable plugin impersonation, pass parameter as True in execute method.
36) What is dynamic entity? Its significance
Ans   ynamic entity is used to create a Custom Entity record using SDK
37) How the Plug-in and Workflow will behave in case of Off-line client?
Ans : With the Outlook client, further extending your existing solution. You can choose to have the plug-in execute only against the server, run offline with the Outlook client, or both.
Remember that when a client goes offline and then returns online, any plug-in calls are executed after the data synchronizes with the server. If you choose to have your logic execute both with the server and offline, be prepared for Microsoft Dynamics CRM to execute your plug-in code twice.
Microsoft Dynamics CRM does not support an asynchronous implementation of a plug-in with offline deployment. If you want to have your plug-in work offline, you need to register it in synchronous mode.
38) What is Microsoft Dynamics CRM E-mail Router?
Ans : Microsoft Dynamics CRM E-mail Router is a software component that creates an interface between a Microsoft Dynamics CRM deployment and the organization’s messaging system. The E-mail Router routes qualified email messages to the Microsoft Dynamics CRM system as email activities and fully integrates with different messaging systems, such as Microsoft Exchange Server, Microsoft Exchange Online, POP3, and SMTP. The E-mail Router includes the functionality for sending email through any desired SMTP provider and for receiving email from Microsoft Exchange Server or from a POP3 server. Additionally, the Forward Mailbox feature remains available.
39) When do we register a plugin in child pipeline. give examples ?
Ans : In Microsoft Dynamics CRM 4.0, there existed a parent and a child pipeline. These pipelines have
been consolidated into one pipeline
-  A pre-event plug-in registered in the parent pipeline of Microsoft Dynamics CRM 4.0 is equivalent
to registering a CRM 2011 plugin in Pre-Event, Pre-Validation (stage 10).
-  A pre-event plug-in registered in the child pipeline of Microsoft Dynamics CRM 4.0 is equivalent to
registering a CRM 2011 plugin in Pre-Event, Pre-Operation (stage 20).
Example of a child pipeline (or pre-event, pre-operation plugin in CRM 2011): Change the
quotenumber in the Pre-Stage for the Create of a Quote. The quotenumber is a field that the
CRM web service will not allow you to change after it is written to the database so you need to
use the Pre-Stage and modify the context Entity before the end of the Execute method.
40) What is WSDL ?
Web Services Description Language (WSDL). This programming paradigm lets you develop code
from non-.NET clients, and does not depend on the use of Microsoft Dynamics CRM assemblies.
41) What is the use of stringmap table.
Ans : If you look in an entity table, columns of Picklist datatype only store Integer values. The actual text
value to be displayed on the UI comes from the ‘StringMap’ table.
42) when can infinite loop occur in a plugin. How do you avoid infinite loops in plugin code ?
Ans : When you create a plugin that updates an entity, and then you register that plugin on the update
message.
43) Can you call a plugin using Javascript ?
Ans : The only way you may go about doing so may be as follows: You can accomplish this by creating
a custom entity you want to use as a trigger.  You attach your plugin to that entity either at the create
message or the update message (requires you to have one record created that you update). Now,
in Jscript, when you want to call the entity all you have to do is call the update or create for that custom
entity (depending on which message you attached your plugin to).  This way you can fire your plugin
from anywhere you can access jscript.
44) How do you configure Sharepoint to work with CRM 2011 ?
Ans : Start the Microsoft SharePoint Foundation User Code Service
Run the powershell script to allow htc files in SharePoint.
In CRM you then have to configure the relevant document management settings.
45) How to make your CRM 4.0 to CRM 2011 upgrade faster ?
Ans : Clear the Asynchronous table: When you upgrade your environment, the upgrade process deletes
out any legacy asynchronous system jobs. If the table is very large, this can slow down the upgrade.
I recommend clearing out the completed jobs prior to upgrade.
Run the deletion service:  In CRM 4.0, if you deleted records, the records were not immediately
deleted—they were flagged for deletion, then the CRM deletion service came along, usually within
24 hours, and deleted the records. One problem that can happen, especially if large numbers of
records were bulk deleted, is that records can get stuck in the “soft delete” state.In 2011, there is
no more soft deletion of records—they are deleted immediately from the database when the records
are deleted in CRM. When you upgrade, the upgrade process will hard delete any leftover “soft deleted”
records. If you have many deleted records in your system, this step can take a while.
46) When to use Plugin and when to use workflows ?
Ans :  Workflows are more suitable if:
you want to achieve simple tasks faster, such as sending an e-mail or creating / updating assigning records. These actions can be set up very quickly with a workflow without any need of writing code.
you want to easily scale things to managers (if they were setup for user records), as it is possible to assign records to them.
you want to allow an advanced user to make changes to logic. As using the integrated workflow designer is user-friendly, an advanced user would be able to edit an existing workflow and change some rules according to business changes.
the logic should be available to be run on demand. I mean, when you are within an entity and navigates to “workflows” option in the left pane, all workflows marked as available to run on demand can be executed making them independent of an event trigger.
you want to send emails making use of templates and attaching files.
Workflows also allow running child workflows which may make a lot of sense in some scenarios. Nevertheless, be careful if you need the child workflow results in order to make decisions on your main workflow, as child workflows always run asynchronous, which means that it will trigger the child workflow and continue. If you need your primary workflow to wait until child ends, you will need to write a custom activity.
On the other hand, plug-ins are more suitable if:
you need to manipulate data before is saved.
you need to make validations before submitting the operation.
you want to be able to cancel an operation based on your validations.
immediate response to the user is needed.
you need retrieve values and/or take actions after operation has been completed (i.e. getting and autogenerated id)
47) When to use Query Expressions and Fetch XML ?
Ans :  QueryExpressions provide the most abstract way to build queries. It can be
very complex to build them but they should be compatible in future releases,
whatever Microsoft decides to do with the database structure. They do
however have a limitation: only one entity type can be returned, so a query
like “select entity1.A, entity2.B from entity1, entity2 …” is not possible
with query expressions.
FetchXML language supports similar query capabilities as query expression. It is used primarily as a serialized form of query expression, used to save a query as a user owned saved view in the userquery entity or as an organization owned view in the savedquery entity. A FetchXML query can be executed by using the Fetch method. There are also messages to convert between query expression and FetchXML.
FetchXml allows you to return properties of multiple queries, eliminating
the restriction of query expressions. The bottleneck is that you have to
parse the returned xml document by yourself.
Using filtered views is the fastest and easiest way to access data, because
you’re using standard SQL queries and ADO.NET. However, this ties you to the
*current* database schema. If a future CRM release has a different
structure, your code may fail. I’m not convinced that both FetchXml and
QueryExpressions will continue to work in this case, but direct database
queries will definitely be the first technique having problems. Furthermore,
if you decide to make your CRM server available in the Internet, web service
calls should be possible while SQL queries usually are not.
48) What are Queues ? How Queues are diff. in CRM 4.0 and CRM 2011 ?
Ans : A queue is a container for just about anything that demands some action – a task that needs to be done, a case that needs to be closed, a phone call that needs to be made – essentially a queue can act as a one stop place for all things you need to work on.
CRM 4, where every user would have two queues – a private queue, and a work in progress queue created automatically. These queues were like system records, which could not be created externally, and could not be deleted as well. Apart from these queues, an end user could create public queues. In CRM 2011, we have simplified queues such that all queues are alike – there is no notion of a private or a work in progress queue. You can pick up any queue you want, and set it as the default queue for a user or a team. This is a one to many relationship, which means that the same queue can be used as the default queue for multiple users and/or teams.
49) What is ODATA ?
Ans : This endpoint facilitates CRUD operation on entities via scripts using Atom or Json format.Here the endpoint are limited to create, retrieve, update and delete. The REST philosophy does not support other operations. The REST endpoint is only available for JScript and Silverlight Web resources
The REST endpoint provides a ‘RESTful’ web service using OData to provide a programming environment that is familiar to many developers. It is the recommended web service to use for tasks that involve creating, retrieving, updating and deleting records. However, in this release of Microsoft Dynamics CRM the capabilities of this Web service are limited to these actions. Future versions of Microsoft Dynamics CRM will enhance the capabilities of the REST endpoint.
The SOAP endpoint provides access to all the messages defined in the Organization service. However, only the types defined within the WSDL will be returned. There is no strong type support. While the SOAP endpoint is also capable of performing create, retrieve, update and delete operations, the REST endpoint provides a better developer experience. In this release of Microsoft Dynamics CRM the SOAP endpoint provides an alternative way to perform operations that the REST endpoint is not yet capable of.
50)  How to add more than 8 tabs in MS CRM ?
Ans : We all know that max tabs that CRM can show is 8. However to extend that go to :
C:\Program Files\Microsoft CRM Server\CRMWeb\Tools\FormEditor find your formeditor.aspx and select edit. Find the JavaScript variable _iMaxTabs and notice that it is set to 8. Change the value to your desired limitation, save and close, reset IIS and you should then be able to create the additional tabs needed from within the forms customization area.
51) What is plugin context?
Ans. All plug-ins must implement the IPlugin interface. The IPlugin interface defines an Execute method, which takes anIPluginExecutionContext parameter. When a system event is fired for which a plug-in is registered, the system creates and populates the context. The system then calls the plug-in’s Execute method, passing in the context as a parameter.

At run time, the execution context is passed to each registered plug-in in the pipeline when they are executed. Each plug-in in the execution pipeline is able to modify writable properties in the context. For example, given a plug-in registered for a pre-event and another plug-in registered for a post-event, the post-event plug-in can receive a context that has been modified by the pre-event plug-in. The same situation applies to plug-ins that are registered within the same stage. The context contains information that describes the run-time environment that the plug-in is executing in, information related to the execution pipeline, and entity business information.

No comments:

Post a Comment