Microsoft Dynamics CRM Interview Questions and Answers

  • Form events in MS CRM?

    • OnLoad Event
      • The OnLoad event occurs after the form has loaded.
      • It cannot prevent the window from loading.
      • Use the OnLoad event to apply logic about how the form should be displayed, to set properties on fields, and interact with other page elements.
    • OnSave Event
      • The OnSave event occurs when:
      • The user clicks the Auto save button button in the lower right corner of the form, even when there is no changed data to be saved.
      • Code executes the method, even when there is no changed data to be saved.
      • The user navigates away from the form and there is unsaved data in the form.
      • With auto-save is enabled, 30 seconds after data has changed and there is unsaved data in the form.
      • Code executes the method and there is unsaved data in the form.
      • Code executes the method passing a true value as the first parameter and there is unsaved data in the form.
    • Field OnChange Event
      • The OnChange event occurs when:
      • The data in a form field has changed and focus is lost.
      • Radio buttons or check boxes clicked.
      • Calling attribute.fireOnChange method.
      • The OnChange event does not occur if the field is changed programmatically using the setValue method. If you want call attribute.fireOnChange method.
    • Tab TabStateChange Event
      • The TabStateChange event occurs when the DisplayState of the tab changes due to user interaction or when the setDisplayState method is applied in code.
      • Use this event when you wish to change the src property of an IFRAME within the tab.
      • If you set the IFrame src property in the OnLoad event for an IFRAME within a collapsed tab, the value will be overwritten when the tab is expanded.
    • IFRAME OnReadyStateComplete Event
      • The OnReadyStateComplete event indicates that the content of the IFRAME has loaded and can be accessed in code.
      • Use this event when referencing IFRAME controls within your scripts.
    • Lookup Control PreSearch Event
      • The lookup control has a PreSearch event that occurs just before the control launches a dialog to search for records.
      • There is no UI to set event handlers for this event.
      • You must use the addPreSearch and removePreSearch methods on the lookup control to add or remove event handlers for this event.
    • OnProcessStatusChange Event
      • This event occurs when the status of a process instance changes.
      • Use the method to add event handlers for this event
      • and the method to remove them.
    • OnStageChange Event
      • This event occurs when the user clicks the Next Stage or Move to previous stage buttons in the user interface
      • or when a developer uses the or methods.
      • You can’t cancel the stage change using code in a handler for this event.
    • OnStageSelected Event
      • This event occurs when a stage of a business process flow control is selected.
      • You can’t cancel the stage selection using code in a handler for this event.
    • Knowledge Base Search Control Events
      • The knowledge base search control can only be added to forms for organizations that has the knowledge management feature enabled. This control has two events (OnResultOpened and OnSelection) that developers can programmatically assign event handlers to.
    • Subgrid OnLoad event
      • Subgrids load asynchronously from the form so you can’t reliably get access to the data in the subgrid in the form OnLoad event. But you can set an event handler for the OnLoad event of the subgrid.
      • This event will occur each time the data in the grid is refreshed, this includes when users sort the columns of the grid.
    • Editable Grid Events
      • OnRecordSelect
        • The OnRecordSelect event occurs when a single row (record) is selected in the editable grid. This event won't occur if a user selects different cells in the same row, or selects multiple rows.
      • OnChange
        The OnChange event occurs when a value is changed in a cell in the editable grid and the cell loses focus. This event can also occur when an attribute value is updated using the setValue method.
      • OnSave
        • The OnSave event occurs before sending the updated information to the server, and when any of the following occurs:
          There is a change in the record selection.
          The user explicitly triggers a save operation using the editable grid’s save button.
          The user applies a sort, filter, group, pagination, or navigation operation from the editable grid while there are pending changes.

  • How Active Directory Authentication Works?

    A request to authenticate a user is sent from Microsoft Dynamics CRM or a custom application to Active Directory. The WCF stack manages the authentication process for Microsoft Dynamics CRM SDK API calls from an application, whereas Internet Information Services (IIS) manages authentication for a Web application.

  • How Claims-based Authentication Works?

    A request to authenticate a user is sent from Microsoft Dynamics CRM 2011 or Microsoft Dynamics CRM Online or a custom application to the STS server. The STS server determines whether the user should be authenticated, and if so, issues a signed and encrypted SAML token that contains user authentication information. The token has a finite life span and may have to be periodically refreshed depending on how long your application is using the token.

  • Web services to involve in data access?

    1. REST endpoint

    The REST endpoint provides a ‘RESTful’ web service using OData to provide a programming environment. It is the recommended web service to use for tasks that involve creating, retrieving, updating and deleting records.

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

  • What Areas where we can write JavaScript?

    We can use JavaScript to perform actions in form scripts, ribbon commands and web resources.

  • What are methods in IOrganizationService

    • Use the IOrganizationService.Create method to create an instance (record) of any entity that supports the Create message, including custom entities.
    • Use the IOrganizationService.Retrieve method to retrieve an instance (record) of an entity.
    • Use the IOrganizationService.RetrieveMultiple method to retrieve a collection records. The query can be specified using a query expression or Fetch XML query. If the query includes an aggregate function.
    • Use the IOrganizationService.Update method to update an existing record.
    • Use the IOrganizationService.Delete method to delete an existing record.
    • Use the IOrganizationService.Associate method to create a link between two records that participate in a relationship.
    • Use the IOrganizationService.Disassociate method to delete the link between two records.
    • Use the IOrganizationService.Execute method to execute a message. This includes common processing like create and delete of data records and metadata, or it can be specialized processing such as import or detect duplicates.

  • What is Plugin Profiler?

    Plug-in Profiler is a tool that profiles the execution of plug-ins for an enhanced debugging experience in Microsoft Visual Studio. Thistool can be used in either the debug or replay mode.

    1. This can be run from the Command Prompt window or from within the Plug-in Registration tool, makes developing plug-ins against Microsoft Dynamics CRM and Microsoft Dynamics CRM Online quicker and easier.
    2. In the tool's main window, select Install Profiler. You will now see a Plug-in Profiler node in the list.
    3. Select a plug-in step and click Profile to enable profiling.
    4. Perform the operation in Microsoft Dynamics CRM that causes the plug-in to run. For example, if the step is configured for an update to an account, then update an account.
    5. After the plug-in throws an exception and the Business Process Error dialog is displayed, click Download Log File and save this file. Alternately, if the plug-in does not throw an exception, click Stop Profiling.

  • Error Handling in Plug-ins

    1. For synchronous plug-ins, the Microsoft Dynamics CRM platform handles exceptions passed back to the platform by displaying an error message in a dialog of the web application user interface.
    2. For asynchronous plug-ins, the exception message is written to a System Job (AsyncOperation) record.
    3. For plug-ins not registered in the sandbox, the exception message (System.Exception.Message) is also written to the Application event log on the server that runs the plug-in.
    4. Sandboxed plug-ins should use tracing.
      1. Tracing is to provide isolated (sandboxed) plug-ins and custom workflow activities with a way to output runtime information when an exception is thrown because isolated plug-ins and custom workflow activities cannot write information to the system event log or the file system.
      2. The tracing service was implemented to provide sandboxed plug-ins and custom workflow activities with a means to output run-time information when an exception is thrown. In addition, tracing is also supported in plug-ins that is not sandboxed.

  • How to debug a Sandboxed Plug-in

    1. The Microsoft Dynamics CRM Sandbox Processing Service on the sandbox server.
    2. The sandbox host process monitors the sandbox worker process that is executing the plug-in.
    3. To disable the shutdown feature, set the following registry key to 1 (DWORD):


  • Services required for debugging a Plugin?

    a. Running the application in online mode - w3wp.exe
    b. Running the application in offline mode - Microsoft.Crm.Application.Hoster.exe
    c. Asynchronous Registered Plug-ins - CrmAsyncService.exe
    d. Sandbox (Isolation Mode) - Microsoft.Crm.Sandbox.WorkerProcess.exe

  • What are privileges required for registering plugin?

    The system user account under which the plug-in is being registered must have the following organization wide security privileges:

    1. prvCreatePluginAssembly
    2. prvCreatePluginType
    3. prvCreateSdkMessageProcessingStep
    4. prvCreateSdkMessageProcessingStepImage
    5. prvCreateSdkMessageProcessingStepSecureConfig

  • What is difference between database and disk deployment?

    Plug-ins stored in the database is automatically distributed across multiple Microsoft Dynamics CRM servers in a data centre cluster and are included in database backups and redeployments. On-disk storage of plug-ins is useful for debugging plug-ins using Microsoft Visual Studio.

  • What is difference between early and late binding?

    Key difference between early and late binding involves type conversion. Whereas early binding provides compile-time checking of all types so that no implicit casts occur, late binding checks types only when the object is created or an action is performed on the type. The Entity class requires types to be explicitly specified to prevent implicit casts.

  • What is Impersonation ?

    Impersonation is used to execute business logic (custom code) on behalf of a Microsoft Dynamics CRM system user to provide a desired feature or service for that user.

  • What is meant or difference between input parameter and output parameter?

    The data that is in the request message currently being processed by the event execution pipeline.

    The OutputParameters property contains the data that is in the response message, such as a CreateResponse, currently being passed through the event execution pipeline.

  • When you go for plug-in and workflow?

    1. Plug-in
      1. Plug-in supports range of SDK messages or can be triggered but workflows are limited to be triggered on record creation, status change, and assignment, attribute change and deletion.
      2. Plug-in can execute synchronously on Pre Validation and Database Transactions.
      3. Needs a synchronous action to happen before or after an event occur.
      4. Needs elevation of privileges (impersonation)
      5. The process/logic may take a long time to complete or will be a persistent process (multiple long running steps).
      6. Better small operations like data lookups, common data operations.
      7. Data validations.
    1. Workflow
      1. Child sub processes will be triggered.
      2. Can run processes manually using run workflow.
      3. Plug-in is not intend to fire or execute logic while timeout or subscription with recursive.

  • What is the difference plugin and workflow?

    1. Plugin is not intend to fire or execute logic while timeout or subscription with recursive.
    2. Plugin supports all most every message other than creation, status change, and assignment, attribute change and deletion.
    3. Plug-inis not bound by the features and logic patterns that the workflow editor supports.
    4. Elevations on privilege which the process is execute on behalf of another user but in workflow users they can create their own.
    5. We can’t stop plugin process execution like work flow stops using stop workflow step.
    6. We can’t execute plugin process either manually or on demand.
    7. Only developers can implement the plugin.
    8. Plugin support both offline, online and on-premise which means sandbox.
    9. Immediate effect on result.
    10. Needs a synchronous action to happen before or after an event occur.
    11. Can be triggering either child pipeline or parent pipeline.

  • What is meant by sandbox? How it is differentiate between standard environments?

    1. Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online support the execution of plug-ins in an isolated environment. In this isolated environment, also known as a
    2. Use of the full power of the Microsoft Dynamics CRM SDK to access the web services. Access to the file system, system event log, network, and more is prevented in the sandbox.
    3. It is more secure, supports run-time monitoring and statistics reporting, and is supported on all Microsoft Dynamics CRM deployments.
    4. In registration Sandbox, known as partial trust:
    5. Outside sandbox is full trust: Full trust is supported for on-premise and Internet-Facing Microsoft Dynamics CRM deployments.
    6. Microsoft Dynamics CRM Online deployment, plug-ins must be registered in the sandbox (partial trust) because no full trust run-time environment is supported. Partial trusts are also supported for on-premise deployments.
    7. Sandboxed plug-ins can access the network through the HTTP and HTTPS protocols.
    8. Access to localhost (loopback) is not permitted.
    9. IP addresses cannot be used. Plug-ins must use a named web address that requires DNS name resolution.
    10. Anonymous authentication is supported and recommended.
    11. Full trust is supported for on-premises and internet facing Microsoft Dynamics CRM deployments. For a Microsoft Dynamics CRM Online deployment, plug-ins must be registered in the sandbox (partial trust) where they are isolated as previously described.

  • What is the purpose of plug in?

    1. Performing complex platform level data validation
    2. Performing auto-number generation
    3. Providing integration with other applications
    4. Executing complex business logic
    5. Data auditing and look up.
    6. Performing common database operations.

  • What meant by plugin?

    A plug-in is custom business logic that can integrate with Microsoft Dynamics CRM 2011 to modify or augment the standard behaviour of the platform.

  • What meant by Queue in CRM

    1. Queue is a central location to monitor the progress, prioritise user work and change status of activities. Or collection of queue items.
    2. It is used to processing sales orders, responding to service calls, pre validation of consumer services, tracking of emails and product information to prospect clients.
    3. The following information pertains to queues:
      1. All customizable entities, business or custom, can be enabled for queues.
      2. A default queue is automatically created for each new user or team.
      3. You can assign and share queues with other users and teams to improve collaboration efforts.
      4. Queues can be enabled for workflows and audit. This helps improve productivity and track the entity and attribute data changes for future analysis and reporting.
      5. A queue contains information about the user who is working on a particular queue item. This helps you manage your resources more efficiently and helps to prevent duplication of work.
      6. A queue can contain multiple entity types, such as tasks, emails, or cases.
      7. A queue is user-owned or team-owned. This provides a high level of security by allowing data access to specified users and teams instead of to the whole organization.

  • What meant by deletion service in CRM?

    1. When you delete a record in Microsoft CRM, most often the record is not deleted from the database but rather the deletionstatecode is set to 2.
    2. When the deletion service runs it will remove the record from the database. After some investigation it looks like the deletion service runs every 24 hours.
    3. Currently the only way I know to force the deletion service to run on Microsoft CRM 4.0 is to stop and restart the Asynchronous Service.

  • How to hide ribbon button?

    1. Create a solution add the entity what you want and export it and extract it xml designer.
    2. Then navigate into the location RibbonDiffXml next add the customaction tag
    3. Then add the <hidecustomaction by specifying the hideactionid and location.

  • How to rename button in CRM 2011?

    1. Create a solution add the entity what you want and export it and extract it xml designer.
    2. Then navigate into the location RibbonDiffXml next add the customaction tag by specifying id and location and sequence.
    3. Next add button by specifying the id, command, sequence, Alt, label text, image 16 and 32, templatealias, tooltip title and description under the tag CommandUIDefinition>
    4. Next define the template with lable, tooltip text, description.


    The <CommandDefinition> (RibbonDiffXml) element defines a command in the ribbon. The Id attribute specifies a unique identifier for the command that can be referenced by ribbon control elements by using the Command parameter.

    A ribbon command defines three things:

    • Enable Rules: Specifies when a specific ribbon control will be enabled.

    When configuring Ribbon elements you can define specific rules to control when the ribbon elements are enabled. The <EnableRule> (RibbonDiffXml) element is used as follows:

    • Use the /RuleDefinitions/EnableRules/EnableRule element to define rules controlling when the ribbon element should be enabled.
    • Use the /CommandDefinitions/CommandDefinition/EnableRules/EnableRule element to associate specific enable rules to a command definition.
    • Display Rules: Specifies when a specific ribbon element will be visible.

    When configuring ribbon elements, you can define specific rules to control when the ribbon elements will display.

    • Use the /RuleDefinitions/DisplayRules/<DisplayRule> (RibbonDiffXml) element to define rules controlling when the ribbon element should be displayed.
    • Use the /CommandDefinitions/CommandDefinition/DisplayRules/<DisplayRule> (RibbonDiffXml) element to associate specific display rules to a command definition.
    • Actions: Specifies what code will execute when a ribbon control is uses.

    Define the actions to be performed by a ribbon control in a <CommandDefinition> (RibbonDiffXml) element together with rules that control whether the control is enabled or visible in the ribbon.

    A Ribbon control can perform two types of actions and may include multiple actions:

    • JavaScript Functions: A <JavaScriptFunction> (RibbonDiffXml) element references a function defined in a Script Web resource.
    • Open a URL: The ribbon opens a URL using the value from an Address attribute in the <Url> (RibbonDiffXml) Additional parameters can pass information about how what querystring parameters are passed and the mode in which the window opens.
      You have several options to pass parameters to a URL using the ribbon. For more information, see Pass Parameters to a URL By Using the Ribbon.

  • Localized labels with Ribbon?

    1. Although Ribbon elements that display text allow for direct entry of text, it is a best practice to use localized labels to define text displayed in the ribbon. This enables multi-language capabilities and better management of shared text.
    2. The <RibbonDiffXml> (RibbonDiffXml) element includes the <LocLabels> (RibbonDiffXml)
      1. <LocLabels>
      2. <LocLabel Id="MyISV.account.SendToOtherSystem.LabelText">
    • <Titles>
    1. <Title languagecode="1033"
    2. description="Send to Other System" />
    3. </Titles>
    • </LocLabel>
    • <LocLabel Id="MyISV.account.SendToOtherSystem.ToolTip">
    1. <Titles>
    2. <Title languagecode="1033"
    3. description="Sends this Record to another system" />
    • </Titles>
    • </LocLabel>
    • </LocLabels>

  • How to access the default ribbons?

    1. SDK\Resources\ExportedRibbonXml or
    2. RetrieveApplicationRibbonRequest
      1. This message retrieves the core application ribbons including the entity template.
    3. RetrieveEntityRibbonRequest
      1. This message retrieves the ribbon definition used for a specific entity.

  • What meant by ribbon definitions?

    Is the root tag which defined in entity ribbon xml under this can see UI tags, templates, command definitions and rule definitions?

  • What are the types of ribbons?

    1. Application ribbon:
      1. The applicationRibbon.xml file contains the definition of the core application ribbons.
    2. Entity ribbon.
      1. The entity grid ribbon is a collection of tabs that have an Id attribute value beginning with Mscrm.HomepageGrid.<entity logical name>.
    3. SubGrid Ribbons
      1. When a list of records for a different entity is displayed within a sub grid on the form of another entity or in a chart, the ribbon will change when the user places the cursor in the grid. A contextual group with the label List Tools is displayed. The single tab included in that contextual group will have the plural display name of the entity.
      2. The entity sub grid ribbon is a contextual group with a collection of tabs that have an Id attribute value beginning with Mscrm.SubGrid.<entity logical name>. For example, the tab with the text "Accounts" on account entity sub grid is Mscrm.SubGrid.account.MainTab.
    4. Form Ribbons
      1. Each entity form can have a specific ribbon definition. In the exported customizations.xml file, you must add your modified <RibbonDiffXml> (FormXml) to this location://ImportExportXml/Entities/Entity/FormXml/forms/systemform/form/RibbonDiffXml.
    5. Other Ribbons
      1. Several other special purpose ribbon tabs and a contextual group are defined byMicrosoft Dynamics CRM. Each tab is associated with a specific <TabDisplayRule> (RibbonDiffXml) that controls when they will display. The following table lists these tabs.


        Root Id


        Web Resource Edit page tab.


        Displays when editing Web resources within a solution.

        Form Editor tab


        Provides Save, Edit, Select, and View groups of actions for entity forms.

        Form Editor Insert tab


        Provides buttons to insert Sections, Tabs, and Controls in entity forms.

        Dashboard Homepage tab


        Displays in the Workplace area.

        Visualization Tools Contextual Group


        Displays when the New Chart button is clicked on the Charts tab displayed in the entity grid ribbon.

        AptbookTab Homepage tab


        Displays when viewing the Service Calendar in the Service area.

        Advanced Find tab


        Displays in the Advanced Find window.

        Dashboard Editor tab


        Displays when editing a dashboard.

        Documents tab


        Displays if SharePoint integration has been enabled for the organization.

        Chart Editor tab


        Displays when editing a chart from the solutions window.

        Search Tools Contextual Group


        Displays when viewing the KBarticle entity.

  • What is meant by web resources and how it is maintain in CRM?

    1. Is a virtual file that are stored in the Microsoft Dynamics CRM database and that you can retrieve by using a unique URL address.
    2. Used to extend the Microsoft Dynamics CRM web application such as html files, JScript, and Silverlight applications.
    3. Use web resources in form customizations, the SiteMap, or the application ribbon because they can be referenced by using URL syntax.
    4. Are stored in Microsoft Dynamics CRM and are solution components, they can be easily exported and installed to on-premises and online and office outlook online and offline.
    5. Web resources are limited to static files or files that are processed in the browser and not in server like page.
    6. Web resources are only available by using the Microsoft Dynamics CRM web application security context.
    7. The maximum size of files that can be uploaded is determined by the Organization.MaxUploadFileSize property in system settings and default is : 5 MB.
    8. 10 Types (HTML, CSS, Java script, XML, XAP, XSL stylesheet, image (ico, gif, jpg, png).
    9. References that use the $webresource directive in SiteMap or ribbon commands will establish dependencies.

  • What is meant by publisher?

    Publisher is used to define the prefix for entity, field, relationship and web resource and order of option set for a solution.

  • What is meant by managed properties?

    Control whether a solution component is customizable and which specific parts of it can be customized. For example: can be customized is true or false, display name can be modified, new form, new view and new chart.

  • What are the minimum privileges require creating a solution?

    1. Read write of customizations.
    2. Read write of publisher
    3. Read write of solution
    4. Read write of web resource
    5. Import and export customizations
    6. Publish customizations.

  • What is meant by solution components?

    1. Schema (entities, attributes, relationships, global option sets)
    2. UI (ribbons, sitemap, forms, and web resources)
    3. Dashboards, reports and charts.
    4. Service End points
    5. Process (plugins, workflows )
    6. Sdk message processing steps
    7. Templates
    8. Connection Roles
    9. Security Roles
    10. Field level security profiles

  • What are the types of solutions?

    1. Default solution
    2. Managed and unmanaged solution.

  • What is meant by solution and how and where it maintained in CRM?

    A Solution is a container for components that make up a particular customization project. By keeping track of all the components of a single Solution, package, and maintain units of software that extend Microsoft Dynamics CRM

    1. When a Solution is exported or imported, all components are transferred.
    2. Version control is maintained
    3. Security specific to the Solution is applied to the correct entities.

  • What is the difference between managed and un-managed solutions?

    1. A managed solution is a completed solution that is intended to be distributed and installed.
    2. An unmanaged solution is one that is still under development or is not intended to be distributed.
    3. Managed solutions can also be layered on top of other managed solutions.
    4. Any unmanaged customized solution component can be associated with any number of unmanaged solutions.
    5. Deleting a managed solution will uninstall all of the solutions components.
    6. Unmanaged solutions are references to customizable solution components in the organization.
    7. Think of unmanaged solutions as source code and think of managed solutions as compiled, versioned and signed assemblies.
    8. Unmanaged
      1. Add components.
      2. Remove components.
      3. Delete components that allow for deletion.
      4. Export and import the unmanaged solution.
      5. Export the solution as a managed solution.
    9.  Managed
      1. You cannot add or remove solution components in a managed solution.
      2. You cannot export a managed solution.
      3. Deleting a managed solution uninstalls all the solution components within it.
      4. After you generate a managed solution, you cannot install it in the same Microsoft Dynamics CRM organization that contains the unmanaged solution.