Your SlideShare is downloading. ×

Microsoft dynamics crm 2011 interview questions


Published on

Published in: Education, Technology, Business
No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. 1. What is the difference between managed and un-managed solutions? a. A managed solution is a completed solution that is intended to be distributed and installed. b. An unmanaged solution is one that is still under development or is not intended to be distributed. c. Managed solutions can also be layered on top of other managed solutions. d. Any unmanaged customized solution component can be associated with any number of unmanaged solutions. e. Deleting a managed solution will uninstall all of the solutions components. f. Unmanaged solutions are references to customizable solution components in the organization. g. Think of unmanaged solutions as source code and think of managed solutions as compiled, versioned and signed assemblies. h. Unmanaged i. Add components. ii. Remove components. iii. Delete components that allow for deletion. iv. Export and import the unmanaged solution. v. Export the solution as a managed solution. i. Managed i. You cannot add or remove solution components in a managed solution. ii. You cannot export a managed solution. iii. Deleting a managed solution uninstalls all the solution components within it. iv. After you generate a managed solution, you cannot install it in the same Microsoft Dynamics CRM organization that contains the unmanaged solution.2. What is meant by solution and how and where it maintained in CRM? a. 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 2011 i. When a Solution is exported or imported, all components are transferred. ii. Version control is maintained iii. Security specific to the Solution is applied to the correct entities. b. c.3. We cannot export the default solution as a managed solution.4. What are the types of solutions? a. Default solution b. Managed and unmanaged.5. What is meant by solution components? a. Schema (entities, attributes, relationships, global option sets) b. UI (ribbons, sitemap, forms, and web resources) c. Dashboards, reports and charts. d. Service End points
  • 2. e. Process (plugins, workflows ) f. Sdk message processing steps g. Templates h. Connection Roles i. Security Roles j. Field level security profiles6. What are the minimum privileges require creating a solution? a. Read write of customizations. b. Read write of publisher c. Read write of solution d. Read write of web resource e. Import and export customizations f. Publish customizations.7. 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.8. Dependency tracking?9. 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.10. What is meant by web resources and how it is maintain in CRM? I. Is a virtual file that are stored in the Microsoft Dynamics CRM database and that you can retrieve by using a unique URL address. II. Used to extend the Microsoft Dynamics CRM web application such as html files, JScript, and Silverlight applications. III. Use web resources in form customizations, the SiteMap, or the application ribbon because they can be referenced by using URL syntax. IV. 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. V. Web resources are limited to static files or files that are processed in the browser and not in server like page. VI. Web resources are only available by using the Microsoft Dynamics CRM web application security context. VII. The maximum size of files that can be uploaded is determined by the Organization.MaxUploadFileSize property in system settings and default is : 5 MB. VIII. 10 Types (HTML, CSS, Java script, XML, XAP, XSL stylesheet, image (ico, gif, jpg, png). IX. References that use the $webresource directive in SiteMap or ribbon commands will establish dependencies.11. What is meant by Ribbon in CRM 2011? a. Common navigation model available in CRM 2011 at application and every entity form where we can see tabs, groups and buttons that can be customized to add ISV applications and defined in XML format of every ribbon.
  • 3. b. The change definitions that you specify are applied at runtime when the ribbon is displayed in the application. All of your changes will be in the <CustomAction> (RibbonDiffXml) or <HideCustomAction> (RibbonDiffXml) elements. c. These elements are applied over the default ribbon definitions provided by Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online. d.12. What are the types of ribbons? a. Application ribbon The applicationRibbon.xml file contains the definition of the core application ribbons. b. Entity ribbon. c. Grid Ribbons i. The entity grid ribbon is a collection of tabs that have an Id attribute value beginning with Mscrm.HomepageGrid.<entity logical name> . d. SubGrid Ribbons i. 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. ii. 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. e. Form Ribbons i. 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/systemf orm/form/RibbonDiffXml. f. Other Ribbons 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. Tab Root Id Description Web Resource Edit Mscrm.WebResourceEditTab Displays when editing Web resources page tab. within a solution. Form Editor tab Mscrm.FormEditorTab Provides Save, Edit, Select, and View groups of actions for entity forms.
  • 4. Form Editor Insert Mscrm.FormEditorInsertTab Provides buttons to insert Sections, Tabs, tab and Controls in entity forms. Dashboard Mscrm.DashboardTab Displays in the Workplace area. Homepage tab Visualization Tools Mscrm.VisualizationTools Displays when the New Chart button is Contextual Group clicked on the Charts tab displayed in the entity grid ribbon. AptbookTab Mscrm.AptbookTab Displays when viewing the Service Homepage tab Calendar in the Service area. Advanced Find tab Mscrm.AdvancedFind Displays in the Advanced Find window. Dashboard Editor Mscrm.DashboardEditorTab Displays when editing a dashboard. tab Documents tab Mscrm.DocumentsTab Displays if SharePoint integration has been enabled for the organization. Chart Editor tab Mscrm.VisualizationDesignerTab Displays when editing a chart from the solutions window. Search Tools Mscrm.ArticleSearch Displays when viewing the KBarticle entity. Contextual Group g.13. 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?14. How to access the default ribbons? a. SDKResourcesExportedRibbonXml or b. RetrieveApplicationRibbonRequest This message retrieves the core application ribbons including the entity template. c. RetrieveEntityRibbonRequest This message retrieves the ribbon definition used for a specific entity.15. Localized labels with Ribbon? a. 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. b. The <RibbonDiffXml> (RibbonDiffXml) element includes the <LocLabels> (RibbonDiffXml) element. i. <LocLabels> ii. <LocLabel Id="MyISV.account.SendToOtherSystem.LabelText"> iii. <Titles> iv. <Title languagecode="1033" v. description="Send to Other System" />
  • 5. vi. </Titles> vii. </LocLabel> viii. <LocLabel Id="MyISV.account.SendToOtherSystem.ToolTip"> ix. <Titles> x. <Title languagecode="1033" xi. description="Sends this Record to another system" /> xii. </Titles> xiii. </LocLabel> xiv. </LocLabels>16. RIBBON COMMAND ELEMENTS 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:
  • 6. 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) element. 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.17. If you want to position a new ribbon element within or next to an existing ribbon element, you will need to know the Id values for those elements, as well as the sequence order that will control the relative position of the elements.18. How to rename button in CRM 2011? a. Create a solution add the entity what you want and export it and extract it xml designer. b. Then navigate into the location RibbonDiffXml next add the customaction tag by specifying id and location and sequence. c. 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> d. Next define the template with lable, tooltip text, description.19. How to hide ribbon button? a. Create a solution add the entity what you want and export it and extract it xml designer. b. Then navigate into the location RibbonDiffXml next add the customaction tag c. Then add the <hidecustomaction by specifying the hideactionid and location.20. How to add the custom button, tab and group to ribbon?21. What meant by deletion service in CRM? a. 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. b. 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. c. 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.22. What meant by Queue in CRM 2011? a. Queue is a central location to monitor the progress, prioritise user work and change status of activities. Or collection of queue items. b. 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. c. The following information pertains to queues: i. All customizable entities, business or custom, can be enabled for queues. ii. A default queue is automatically created for each new user or team. iii. A queue can contain multiple entity types, such as tasks, emails, or cases. iv. 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.
  • 7. v. 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. vi. You can assign and share queues with other users and teams to improve collaboration efforts. vii. 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. d.23. 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.24. What is the purpose of plug in? a. Performing complex platform level data validation b. Performing auto-number generation c. Providing integration with other applications d. Executing complex business logic e. Data auditing and look up. f. Performing common database operations.25. How to debug plugin?26. What are development steps?27. What is the difference between CRM 4.0 and 2011 plugins? a. No parent and child pipeline in 2011, consolidated to only one pipeline. b. Supports plugins in online. c. Sandbox execution environment. d.28. What is meant by sandbox? How it is differentiate between standard environments? a. 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 sandbox. b. 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. c. It is more secure, supports run-time monitoring and statistics reporting, and is supported on all Microsoft Dynamics CRM deployments. d. In registration Sandbox, known as partial trust: e. Outside sandbox is full trust: Full trust is supported for on-premise and Internet- Facing Microsoft Dynamics CRM deployments. f. 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. g. Sandboxed plug-ins can access the network through the HTTP and HTTPS protocols. h. Access to localhost (loopback) is not permitted. i. IP addresses cannot be used. Plug-ins must use a named web address that requires DNS name resolution. j. Anonymous authentication is supported and recommended. k. 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
  • 8. registered in the sandbox (partial trust) where they are isolated as previously described. l.29. Plug-ins can check the IsOfflinePlayback property of the execution context to determine whether the plug-in is being executed because of synchronization between the client and the Microsoft Dynamics CRM server.30. When registering a plug-in for offline execution, always register the plug-in for a synchronous mode of execution. Asynchronous execution of offline plug-ins is not supported.31. What is the difference plugin and workflow? a. Plugin is not intend to fire or execute logic while timeout or subscription with recursive. b. Plugin supports all most every message other than creation, status change, and assignment, attribute change and deletion. c. Plug-inis not bound by the features and logic patterns that the workflow editor supports. d. Elevations on privilege which the process is execute on behalf of another user but in workflow users they can create their own. e. We can’t stop plugin process execution like work flow stops using stop workflow step. f. We can’t execute plugin process either manually or on demand. g. Only developers can implement the plugin. h. Plugin support both offline, online and on-premise which means sandbox. i. Immediate effect on result. j. Needs a synchronous action to happen before or after an event occur. k. Can be triggering either child pipeline or parent pipeline.32. When you go for plug-in and workflow? a. Plug-in i. 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. ii. Plug-in can execute synchronously on Pre Validation and Database Transactions. iii. Needs a synchronous action to happen before or after an event occur. iv. Needs elevation of privileges (impersonation) v. The process/logic may take a long time to complete or will be a persistent process (multiple long running steps). vi. Better small operations like data lookups, common data operations. vii. Data validations. b. Workflow i. Child sub processes will be triggered. ii. Can run processes manually using run workflow. iii. Plug-in is not intend to fire or execute logic while timeout or subscription with recursive.33. 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.
  • 9. The OutputParameters property contains the data that is in the response message, such as a CreateResponse, currently being passed through the event execution pipeline.34. 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.35. 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.36. 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.37. Plug-ins registered in the sandbox must be stored in the database.38. Depending on the plug-ins design, the plug-ins can require other referenced assemblies to run. Regardless of whether the plug-in is deployed to the database or disk, if the plug-in requires other assemblies to run, copies of those assemblies must be placed in the Global Assembly Cache (GAC) on each server where the plug-in is to execute.39. The system user account under which the plug-in is being registered must have the following organization wide security privileges: a. prvCreatePluginAssembly b. prvCreatePluginType c. prvCreateSdkMessageProcessingStep d. prvCreateSdkMessageProcessingStepImage e. prvCreateSdkMessageProcessingStepSecureConfig40. Plug-ins and Solutions When plug-ins are registered in a Microsoft Dynamics CRM deployment, they are included as part of the default solution. The plug-ins and the steps registered with that plug-in can be located in the Plug-in Assemblies and SDK Message Processing nodes of the default solution. This makes plug-ins easier to deploy and re-deploy. Instead of having to manually register plug-ins or to programmatically do it as part of an installer application, a solution that contains the plug-in(s) and the respective registered steps, can be imported.41. Plug-in Registration Service Process 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.exe42. Debugging a Sandboxed Plug-in a. The Microsoft Dynamics CRM Sandbox Processing Service on the sandbox server. b. The sandbox host process monitors the sandbox worker process that is executing the plug-in. c. To disable the shutdown feature, set the following registry key to 1 (DWORD): HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSCRMSandboxDebugPlugins43. Error Handling in Plug-ins a. 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. b. For asynchronous plug-ins, the exception message is written to a System Job (AsyncOperation) record.
  • 10. c. 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. d. Sandboxed plug-ins should use tracing. i. 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. ii. 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. e.44. Plug-in Profiler is a tool that profiles the execution of plug-ins for an enhanced debugging experience in Microsoft Visual Studio 2010. Thistool can be used in either the debug or replay mode. a. 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 2011 and Microsoft Dynamics CRM Online quicker and easier. b. In the tools main window, select Install Profiler. You will now see a Plug-in Profiler node in the list. c. Select a plug-in step and click Profile to enable profiling. d. 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. e. 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.45.46. 5 SYNTAX CHANGES IN DYNAMICS CRM 2011 PLUGINS 1. The IPlugin now resides in Microsoft.Xrm.Sdk namespace instead of Microsoft.Crm.Sdk public classClassName : Microsoft.Crm.Sdk.IPlugin publicclassClassName : Microsoft.Xrm.Sdk.IPlugin 2. The Execute method signature of the IPlugin interface has changed; it now expects an IServiceProvider instead of the IPluginExecutionContext. publicvoid Execute(IPluginExecutionContext context) publicvoid Execute(IServiceProviderserviceProvider) 3. To get a reference to the IPluginExecutionContext you now need to call the GetService method of the IServiceProvider interface. publicvoid Execute(IPluginExecutionContext context) Microsoft.Xrm.Sdk.IPluginExecutionContext context = (Microsoft.Xrm.Sdk.IPluginExecutionContext) serviceProvider.GetService(typeof(Microsoft.Xrm.Sdk.IPluginExecutionContext)); 4. ICrmService has been changed to IOrganizationService. ICrmServicesdk = context.CreateCrmService(true); IOrganizationServiceFactory factory = (IOrganizationServiceFactory) serviceProvider.GetService(typeof(IOrganizationServiceFactory)); IOrganizationServicesdk = factory.CreateOrganizationService(context.UserId); 5. DynamicEntity has been changed to Entity. Properties property of DynamicEntity no longer exists
  • 11. Getting and Setting values no longer use *Property classes, eg: no more KeyProperty, StringProperty…etc, simply do int value = (int)entity[“schema_name”]; if (context.InputParameters.Properties.Contains("Target") && context.InputParameters.Properties["Target"] isDynamicEntity) if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] isEntity)47. crm.html50. Plugin transaction? You can now register your plugin in new stage (see below). That means that you can register your plugin in a transaction (if using stage 20 and 40) and whenever you plugin throws an exception, every action done during the transaction will be rollback. Plugins now execute within the transaction, not outside it anymore. This means that if an error occurs within a plugin that fires on Create of a record, the actions done by the code gets rolled back AND the actual record created to trigger this event is also rolled back. So no more duplicate records if a plugin fails and the user.  CRM 2011 Stages support plugin execution inside the database transaction - Stages 20 & 40  Uncaught exceptions force a rollback  IExecutionContext.IsInTransaction  Transaction spans CRM DB operations only - No distributed transaction support  Plugins registered outside transaction stage will participate in transaction if executed as nested pipeline of transactional parent Plug-ins in CRM4  Plug-ins ran in the same process context and not isolated  Plug-ins could not participate in SQL transactions  Plug-in registration had to be done by a Deployment Administrator Plug-ins in CRM 2011  Able to participate in SQL transactions  Able to create traces returned with exceptions  Plug-in assemblies can have 2 isolation modes: - None or Sandbox  The addition of the Sandbox isolation mode enables the use of plug-ins in CRM Online. - Custom workflow activities will not be enabled in CRM Online for CRM 2011
  • 12. 53. Early Bound:Microsoft Dynamics CRM 2011 uses an entity data model and Windows Communication Foundation (WCF) Data Services technologies to provide a new set of tools that simplify the development of Internet-enabled applications that interact with Microsoft Dynamics CRM. This also enables an additional programming paradigm: an organization service context that tracks changes to objects and supports LINQ queries to retrieve data from Microsoft Dynamics CRM.54. Late-bound – This programming paradigm lets you write code that accesses entities that are not yet defined.55. REST – The REST endpoint for AJAX and Microsoft Silverlight clients provides an alternative interface that you can use to work with Microsoft Dynamics CRM data.Rather than directly invoking the SOAP-based Web service, you can execute requests using a service that is based on a URI.56. WSDL – This programming paradigm lets you develop code from non-.NET clients, and does not depend on the use of Microsoft Dynamics CRM assemblies. EX; crm in java.57. Difference between Microsoft.Crm.Sdk.Proxy.dll and Microsoft.Xrm.Sdk.dll. a. Defines requests and responses for messages business data model specific (non-core) messages as well as enumerations required for working with organization data. b. Defines the core xRM methods and types, including proxy classes to make the connection to Microsoft Dynamics CRM simpler, authentication methods, and the service contracts.58. Web services in CRM 2011? a. The IDiscoveryService Web service returns a list of organizations that the specified user belongs to and the URL endpoint address for each organization. b. The primary Web service for accessing data and metadata in Microsoft Dynamics CRM 2011 is the IOrganizationService Web service59. What are the massages in IDiscoveryService? Message Description RetrieveUserIdByExternalIdRequest Retrieves the logged-on users ID in Microsoft Dynamics CRM Online. This message is available in Microsoft Dynamics CRM Online only. RetrieveOrganizationRequest Retrieves information about a single organization. RetrieveOrganizationsRequest Retrieves information about all organizations to which the user belongs.60. IOrganizationService Web service contains the methods that you must be used in order to write code that uses all the data and metadata in Microsoft Dynamics CRM.
  • 13. 61. 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.62. Areas where we can write JavaScript? We can use JavaScript to perform actions in form scripts, ribbon commands and web resources.63. Web services to involve in data access? a. 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. b. 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.64.65. Authentication in CRM 2011? 2 security models for authentication: claims-based authentication and Active Directory authentication. a. Claims-based authentication: i. is a set of WS-* standards describing the use of a Security Assertion Mark-up Language (SAML) token in either passive mode (when WS-Federation is used with the Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online Web application) or active mode (where WS-Trust in used with Windows Communication Foundation (WCF) clients).
  • 14. ii. This authentication works together with WCF to provide secure user authentication and a communication channel with a Microsoft Dynamics CRM server. iii. All Microsoft Dynamics CRM editions support claims-based authentication. iv. Claims-based authentication requires the availability of a security token service (STS) running on a server.An STS server can be based on Active Directory Federation Services (AD FS) V2. v. To access a claims configured Microsoft Dynamics CRM 2011 or Microsoft Dynamics CRM Online server by using the Microsoft Dynamics CRM SDK methods, you must first install Windows Identity Foundation (WIF) on your development computer Microsoft Dynamics CRM supports the following authentication scenarios for each deployment type. Deployment Authentication model Microsoft Dynamics CRM Online Claims-based or Active Directory (through federation) authentication Microsoft Dynamics CRM 2011 on- Claims-based or Active Directory premises authentication Microsoft Dynamics CRM 2011 Claims-based or Active Directory Internet-facing deployment (IFD) authentication66. 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.67. 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.68. Auditing in CRM 2011? a. Auditing is supported on all custom and most customizable entities and attributes. b. Track changes made to business data for maintaining security. c. Examining the history of a particular data record.
  • 15. d. documenting modifications for future analysis and record keeping, e. Regulations to ensure availability of customer interaction history, audit logs, access reports, and security incident tracking reports. f. Auditing is not supported on metadata changes, retrieve operations, export operations, or during authentication. g. You can enable or disable auditing at the organization, entity, and attribute levels. If auditing is not enabled at the organization level, auditing of entities and attributes, even if it is enabled, does not occur. By default, auditing is enabled on all auditable entity attributes but is disabled at the entity and organization level. h. Auditing data is recorded over time (quarterly) in partitions. A partition is called an audit log in the Microsoft Dynamics CRM Web application. Partitions are not supported, and therefore, not used, on a Microsoft Dynamics CRM 2011server that is running Microsoft SQL Server Standard edition. i. The ability to retrieve and display the audit history is restricted to users who have certain security privileges: View Audit History, and View Audit Summary. There are also privileges specific to partitions: View Audit Partitions, and Delete Audit Partitions. j. Enabling or disabling of field level security by setting the IsSecured attribute cannot be audited. k. When enabling auditing on an entity, all of the entity’s attributes are enabled for auditing by default. Of course you can explicitly disable auditing on any or all of the attributes as needed. l. Data that can be audited i. Create, update, and delete operations on records. ii. Changes to the shared privileges of a record. iii. N: N association or disassociation of records. iv. Changes to security roles. v. Audit changes at the entity, attribute, and organization level. For example, enabling audit on an entity. vi. Deletion of audit logs. vii. When (date/time) a user accesses Microsoft Dynamics CRM data, for how long, and from what client.69. Processes: a. A business process can be of two types: automated processes that rely solely on communication among applications based on a set of rules, and interactive processes
  • 16. that also rely on people to initiate and run the process, and to make the appropriate decisions during the running of the process. b. A Microsoft Dynamics CRM process is based on the Windows Workflow Foundation programming model. c. Windows Workflow Foundation provides a runtime engine, a framework, a base library of activities, and default implementations of the runtime services. d. The Windows Workflow Foundation runtime engine manages process execution, and supports processes that can remain active for extended periods of time. It preserves the state of process execution during computer shutdown and restart. e. Microsoft Dynamics CRM workflows are not supported to run in sandbox mode. f. Workflows. The automated or asynchronous processes that may require user input to start them. g. Dialogs. The interactive or synchronous processes that require user input to start and run them to completion. When you start the dialog process, a wizard-like interface is presented to you so you can make appropriate selections to run the process. h. Now use the System.Activities namespace instead of System.Workflow.Activities to create custom workflow activities. i. The life cycle of a process describes the state transitions from creation through execution. A process can be in one of the following states: Ready, Suspended, Locked, and Completed. The events that occur throughout the lifetime of the process cause a transition from one state to another. j.DIFFERENCES BETWEEN WORKFLOWS AND DIALOGSThe following table provides information about the differences between workflows and dialogs inMicrosoft Dynamics CRM.Workflows DialogsCan be either started by a user or can be Must be started by a user.automated.Are asynchronous processes, and do not Are synchronous processes, andrequire user input to run to completion. require user input to run toThese processes run in the background. completion. When you run these processes, a wizard-like interface is
  • 17. presented to you so you can make appropriate selections to run the processes.The entity that stores the details about a The entity that stores informationrunning workflow is AsyncOperation. generated by a running dialog is the ProcessSession (dialog session) entity.Both Windows Workflow Foundation 4 and Only Windows Workflow FoundationWindows Workflow Foundation 3.5 custom 4 custom activities are supported.activities are supported.Triggers are supported for workflows. For a Triggers are not supported forlist of supported triggers, see Supported dialogs.Types, Triggers, and Entities for Processes(Workflows and Dialogs).Workflows that are created or updated Dialogs that are created or updatedoutside of Microsoft Dynamics CRM by outside of Microsoft Dynamics CRMcreating or updating the underlying XAML by creating or updating thefile are supported in Microsoft Dynamics underlying XAML file are notCRM. For information about these custom supported in Microsoft DynamicsXAML workflows, see Custom XAML CRM.Workflows.WorkflowsThe workflow life cycle is as follows:1. When you create a workflow, it is in the Draft state. You must activate the workflow before it can run. When you activate a workflow, it subscribes to specific Microsoft Dynamics CRM events. When these events are triggered in the platform, a snapshot of the workflow dependencies and input parameters are created and a new asynchronous operation is added to the asynchronous service queue manager. The asynchronous operation represents a workflow execution job and awaits execution in the queue in the Ready state.2. When the asynchronous operation is processed, a workflow instance, associated with this operation, is created by the Windows Workflow Foundation run-time engine and the state of it is changed from Ready to Locked.3. The asynchronous operation is updated with the workflow instance state status on each transition. When the asynchronous operation is blocked, the Windows Workflow Foundation run-time engine puts the workflow instance into the Suspended state and removes it from
  • 18. memory. When the Suspended state conditions are satisfied, the workflow instance is loaded back into memory. 4. The workflow execution resumes by putting the workflow instance into a Ready state and then into a Locked state. In the simple scenario, the workflow instance moves to a Completed state when all workflow activities have completed successfully. The state of asynchronous operations can also be changed by the user. For example, an asynchronous operation that is in a Suspended state can explicitly be restarted by the user. Dialogs A dialog life cycle is as follows: 1. When you create a dialog, it is in the Draft state. You must activate the dialog before it can be run. A dialog can be run from its primary entity form and grid, or directly by using the URL of the dialog. For more information, see Start Dialog by using an URL. 2. Every time that you run a dialog, a process session (dialog session) instance is created for the dialog. As you progress with running the dialog, the dialog session entity is updated with the actions performed during the running of the dialog. 3. If you completed running the dialog successfully, the corresponding dialog session record is created with a Complete status. If you cancelled the dialog without completing it, the corresponding dialog session record is created with an Incomplete status.70. Custom workflows a. You can create custom workflow activities in Microsoft Visual C# or Microsoft Visual Basic .NET code by creating an assembly that contains a class derived from the Windows Workflow Foundation CodeActivity class.This class is available in the System.Activities namespace. b. The custom workflow activity can then be incorporated into a workflow or dialog in the Process form in Microsoft Dynamics CRM. c. Custom workflow activities are not supported for Microsoft Dynamics CRM Online. This is because Microsoft Dynamics CRM workflows are not supported to run in sandbox mode. d. Assemblies must be added to your project. They can be found in the SDKBin folder in Microsoft Dynamics CRM SDK. I. Microsoft.Xrm.Sdk.dll II. Microsoft.Xrm.Sdk.Workflow.dll public class SampleCustomActivity : CodeActivity { protected override void Execute(CodeActivityContext context) { //Activity code } } e. Specify input and output parameters. f. When you register a custom workflow activity assembly, specify the name and group name.The name property specifies the name of the workflow activity. The group name property specifies the name of the submenu added to the main menu in the Microsoft
  • 19. Dynamics CRM process designer. These properties link the custom workflow activity with the Microsoft Dynamics CRM process designer. ADDING INPUT PARAMETERS [Input("DateTime input")] [Default("2004-07-09T02:54:00Z")] publicInArgument<DateTime> Date { get; set; } THIS INPUT PARAMETER IS ANNOTATED WITH THE .NET ATTRIBUTE INPUT. ADDING OUTPUT PARAMETERS [Output("Money output only")] [Default("23.3")] publicOutArgument<Money>MoneyOutput { get; set; } Adding Input and Output Attributes for the Same Parameter [Input("Int input")] [Output("Int output")] [Default("2322")] publicInOutArgument<int>IntParameter { get; set; } Use the IOrganization Web Service in a Custom Workflow Activity protected override void Execute(CodeActivityContextexecutionContext) { // Get the context service. IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>(); IOrganizationServiceFactoryserviceFactory = executionContext.GetExtension<IOrganizationServiceFacto ry>(); // Use the context service to create an instance of IOrganizationService. IOrganizationService _orgService = serviceFactory.CreateOrganizationService(context.Initia tingUserId); // Use _orgService to call methods. } g. attach the debugger to the CrmAsyncService.exe process.71. Deployment web service: a. Manipulate the organization entity to create, import, upgrade, enable or disable organizations. b. Retrieve and view Microsoft Dynamics CRM license information for a deployment. c. Update deployment configuration settings.
  • 20. d. Add or remove deployment administrators. e. Enable, disable, or delete servers. f. Update settings that are stored in the configuration database. g. Enumerate and change the state of servers in the deployment. h. The deployment service works with Windows integrated authentication (Active Directory) only. i. Caller must be a Deployment Administrator to use this Web service.72. Form events a. 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. b. OnSave Event The OnSave event occurs when a user presses the Save or Save and Close button on the form. The event always occurs, even when the data in the form has not changed. c. Field OnChange Event The OnChange event occurs when the data in a form field has changed and focus is lost. Data in the field is validated before and after the OnChange event. All fields support the OnChange event. Although the Status field supports the OnChange event, the field is read-only on the form so the event cannot occur through user interaction. Another script could cause this event to occur by using the FireOnChange method on the field. d.73. Development toolkit: a. The toolkit has been designed to make it easier for you to customize, extend, and maintain a Microsoft Dynamics CRM solution, all from within an integrated Microsoft Visual Studio environment. b. The Developer Toolkit supports creation and deployment of plug-ins, custom workflow assemblies, XAML workflows and Web resources. A developer can write custom code within Visual Studio and deploy the code to an unmanaged solution on a Microsoft Dynamics CRM server. c. With the Developer Toolkit, you can do the following: i. Easily generate strongly typed proxy classes without having to run CrmSvcUtil.exe. ii. Get access to entity and option set definitions within Visual Studio. iii. Generate plug-in code so you can immediately begin to write code for business logic. iv. Edit and register plug-ins without using the Plug-in registration tool.
  • 21. v. Create new web resources or extract existing web resources, add them to your solution, edit them, and deploy changes all within Visual Studio. vi. Create and edit workflow and dialog processes from within Visual Studio. vii. Create and deploy XAML workflows in Visual Studio. viii. Get easy access to security role and field security profile information in Visual Studio.d. CRM Package Project i. In your new solution, the CrmPackage project is a manifest project that contains all assets to be deployed to Microsoft Dynamics CRM combined with their deployment settings. By default, the outputs from each other project are added as references to this project in so that they can be deployed to the server.e.f.