latest dynamics 365 interview questions

Q. How to pass extra value in custom page in power apps?

Ans: Generally in pageInput we can define four parameter like pageType,name,entityName,recordId. But in real senarion if we want to share extra value then we can use in pageInput parameter itself.

Example :

var pageInput = 

{

pageType: "custom",

name: customPageName,

entityName: executionContext.data.entity.getEntityName(),

recordId: currentRecordId + "$" + recordName ;

};

Above value you can retrieve in custom page onStart function like below :

Set(splitParam,Split(Param("recordId"),"$"));

Set(recordName,Last(FirstN(splitParam,2)).Value);

Set(RecordID, Substitute(Substitute(Last(FirstN(splitParam,1)).Value, "{", ""), "}",""));

Q. If I create one record that created record date is older than 3 days then I want to perform some operation with the help of business rule.

example: Let's assume I have case entity form and have created one custom field XYZ if the case is older than 3 days then I need to make XYZ field as mandatory otherwise it would be optional?

Ans: Solution here

Q. What is the entity reference?

Ans:

Q. Let's assume if you are creating new account until and less you save it you will not be able to create some child record or you will not be able add some child record in sub grid.

Example: When I have open new account form at that time, I want to add four and five contact now when i hit save first it would be created account and at the same time contact will also create together. i don't want to use multiple save on form. How will you do this?

Hints: is that possible that you can control the sub grid on create of contact

Ans:

Q. How to send the birthday mail to the user in Dynamic CRM?

Ans:

Q. What type of join you can see in fetch xml?

Ans: There are two type of join(link-type) we can see after downloaded the fetch xml through Advance find.

1. Link-Type = inner join.

    inner join, once you have any related entity exist of the parent records.

    Example: Find the task all task which is having status as completed and contain connection.

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">

<entity name="task">
<attribute name="subject"/>
<attribute name="statecode"/>
<attribute name="prioritycode"/>
<attribute name="scheduledend"/>
<attribute name="createdby"/>
<attribute name="regardingobjectid"/>
<attribute name="activityid"/>
<order attribute="subject" descending="false"/>
<filter type="and">
<condition attribute="statuscode" operator="eq" value="5"/>
</filter>
<link-entity name="connection" from="connectionid" to="regardingobjectid" link-type="inner" alias="am"/>
</entity>
</fetch>

2. Link-Type= outer join.

    You can use a left outer join in FetchXML to perform a query that filters on the join table, such as to find all contacts who did not have any campaign activities in the past two months.

You can refer this link: Refer This Link

Q. How to do outer join in fetch xml?

Ans: Reference

Q. How to debug Azure Function by Postman?

Ans:  

Q. How many ways to debug a plugin in CRM?

Ans:

Q. Step to create Azure Function in visual studio?

Ans:

Q. How to fetch the more than 5000 record in CRM?

Ans: Implement Paging Cookies.

Q. How many types of organization service in CRM?

Ans: OData, Organization Service, Discovery Service.

Q. Is impersonation applicable for synchronous or asynchronous workflow?

Ans: A Synchronous workflow use the impersonation. Asynchronous workflow cannot use the impersonation in CRM.

Synchronous Workflow: While creating the synchronous workflow we have option "Execute as" which is nothing but impersonation. Execute As contain two option "Who is the owner of workflow" and "The user who made the change".

Asynchronous Workflow: In this workflow you will not get any option as such to execute as.


Q. How many services call require to fetch 15000 records?

Ans: If we do paging then One Service Call require to fetch the 15000 records

Q. 10 Accounts each account is having 5 contacts then how many services calls require to fetch the records?

Ans: 

Q. What is the flow you use in CRM project means a project start where and end where?

Ans: 

Q. Let's assume I have a button on home page. using that button i need to update the status of 10 cases record as activate if case records status is Draft using JavaScript?

Ans:  

Q. How to update the child records status once parent records status got updated using JavaScript?

Ans:   

Q. What is the trigger point of plugin?

Ans: Message 

Q. What happen Let's assume in UAT you have import unmanaged solution called (A) but in same environment (UAT) you are importing same solution (A) as managed solution?

Ans:

Q. There is one filed which is deleted in Dev but I want to delete from UAT as well how to do that?

Ans: 

Q. How to move the document template from one instance to another instance in CRM?

Ans: 

Q. Are you able to get the related entity data from email template?

Ans: 

Q. How to take master data from dev to production?

Ans:

Q. What all the solution Component in CRM?

Ans:

Q. How many types of Form in CRM?

Ans: In dynamic CRM we have four types of form.

1.main form: (in this form we do all the customization).

2.quick view form:

3.quick create:

4.card:

Q. What all the component in an entity?

Ans: We have 12 components for a particular entity like form, view, chart, field, key, etc.

Q. How many types of entity in CRM?

Ans: We have three types of entity system, business, custom. 

Business: Account, Contact, Letter.

Custom: Your own entity.

System Entity: Workflow, Asynchronous job.

Q. What will happen we register the plugin on pre-validation and your code will be creating the task and send the email. if any error come then your task will run or roll back?

Ans:  

Q. What is the use of dynamic CRM?

Ans: Dynamic CRM is the combine of CRM AND ERP.

Q. How can we access the dynamic CRM?

Ans:

Q. Do you know the Architecture of Dynamic 365?

Ans:

Q. Can i call action from power automate?

Ans: Yes

Q. What is the authentication to connect with Microsoft data verse?

Ans:

Q.  What is caller ID in Plugin CRM?

Ans:

Q. How to capture error in power automate?

Ans:

Q. Explain the Human Resource Model?

Ans:

Q. Can we register the Logic Apps on event based?

Ans:

Q. Explore the step to hide the button on CRM portal?

Ans:

Q. I have one service which is posted on premise i just want to consume that service in plugin? How?

Ans:

Q. In plugin if i define class as a private, it will be work?

Ans: NO

Q. Performance related issue rise on form script in production environment how you will be identified and resolve?

Ans:

Q. How to change the OData call from synchronous to asynchronous?

Ans:  

Q. What is the advantage of registering the plugin on pre-operation?

Ans:

Q. What is the difference between primary id or primary field of the entity in CRM?

Ans:

Q. While writing the plugin which class you are going to inherit into your plugin?

Ans:

Q. Can we trigger the power automate through JavaScript? if yes, how?

Ans: 

Q. Type of exceptional handle in c#?

Ans: There are different types of exception class in C# code.

1.  System.IO.IOException

2.  System.IndexOutOfRangeException

3. System.OutOfMemoryException

4. System.InvalidCastException

5. System.NullReferenceException

6. System.ArrayTypeMismatchException 

7.System.DivideByZeroException

8. System.StackOverflowException

Q. What is the meaning of type Of in ITracingService tracingService =

 (ITracingService)serviceProvider.GetService(typeof(ITracingService)); of plugin?

Ans: typeOf is the key use in c# to get the type at the time of compilation. 

Q. Which task can you perform with workflow but not with plugin?

Ans: Click here

Q. If two persons work in one call center they have user level read permission on account but one person is on sick leave so another person have to create case for that account which is owned by that sick person so how u will create he will not share record with u, he will not assign record to u and system administrator will also not do that for u so how u can access and create case?

Ans:

Q. What is recurring workflow in DCRM with example?

Ans:

Q. Which one is suitable Business Rule and JavaScript to lock the 100 field in DCRM ?

Ans:

Q. What is the difference between rest API and soap API?

Ans: 

Q. Take the real-time scenarios to explain the plugin pipeline in CRM?

Ans:

Q. Let's assume you are getting data (phone number) from 4 different outside system from different country. How will you differentiate the phone number based on country code and store in one variable in DCRM?

Ans:

Q. Write one plugin once the parent record deletes then child records will be also gotten deleted?

Ans:

Q. What is the use of offline plugin in DCRM?

Ans: Offline mode is supported only on Dynamics 365 for Microsoft Office Outlook with offline access. You can register a plug-in to execute when the Outlook client is in online mode, offline mode, or both. Your plug-in code can check whether it is executing in offline mode by checking the IsExecutingOffline property.

When you design a plug-in that will register for execution both online and offline, remember that the plug-in may execute twice. This is the first time that Dynamics 365 for Microsoft Office Outlook is offline with Offline Access.

When a plug-in is executed offline, any entities created by the plug-in are owned by the logged-on user. Impersonation is not supported in plug-ins in offline mode.

Q. What is the difference between Logic Apps and Azure Function?

Ans: Azure Functions is a serverless compute service, while Azure Logic Apps provides a serverless workflow.

You can run azure function locally, but you can only run logic app in azure.

Azure Function is code being triggered by an event and Logic Apps is a workflow that is triggered by an event.

logic app is series of actions where an action could be a Azure Function means you can call azure function from logic app.

Q. Show the pop-up message once the lead record is created successfully from plugin in DCRM?

Ans: We can show the pop up while executing the plugin if lead is present, we will throw the error like below.

Example :throw new InvalidPluginExecutionException("Lead is all ready created");

Q. What is the difference between Rollup and Calculated field in DCRM?

Ans: 

Calculate:

Calculated fields are virtual fields, not physical, not committed to the database; But available on ideas, forms.

calculated field automate your manual calculation. 

example :If the user wants the discount to be applied automatically if the order is greater than  $100. A calculated field can contain values ​​as a result of simple math operations, or conditional operations, such as greater-than or if-else, and many others. You can accomplish all this using the Dynamics 365 user interface, there is no need to write code.

Calculated fields include calculations that use fields from the current entity or related parent entities

Expression support in calculated field of current entity or related parent entities are: add hours, ADDDAYS, ADDWEEKS, ADDMONTHS, ADDYEARS, SUBTRACTHOURS, SUBTRACTDAYS, SUBTRACTWEEKS, SUBTRACTMONTHS, SUBTRACTYEARS, DIFFINDAYS, DIFFINHOURS, DIFFINMINUTES, DIFFINMONTHS, DIFFINWEEKS, DIFFINYEARS, CONCAT, TRIMLEFT, and TRIMRIGHT.

Real time calculation happened in calculated field, form, view, report.

Few example:

Labor cost: Base rate up to 40 hours, plus additional overtime.

Opportunity Weighted Revenue:





Rollup:

Rollup is physical data and data committed to the database.

Rollup is computed by scheduled system jobs that run asynchronously in the background.

A rollup field contains an aggregate value computed over the records related to a specified record.

Wide selection of aggregate functions. You can aggregate data by using the following functions: SUMCOUNTMINMAX and AVG.

Example:

Aggregate data for a record from related records.

In this example, a hierarchy is not used. The total estimated revenue is calculated for an account, from the related open opportunities.


Q. What is IMPERSONATE in plugin ?

Ans: while register the plugin , we can change the user  under which plugin will run. I have a plugin that runs on create of an account that creates a new Task. We will select this to run under the context of a user, Arshad by setting Run in User’s Context: please see the screenshot below.

Now we will check user ARSHAD is having privilege to create the task or not if not we will provide the privilege to create the task. In my case i haven't given the privillage that is way plugin got failed.



Note :  IPluginExecutionContextUserId is the properties to get userId context.

Q. How to debug your JavaScript code when you solution in production?

Ans: Step 1: Go to developer tool in Chrome.

         Step 2: Source tab and select the JS File.

         Step 3: Click on the pause script execution.



Q. Can we use link entity in query expression if yes how?

Ans: Yes, Please follow the below link.

https://docs.microsoft.com/en-us/dotnet/api/microsoft.xrm.sdk.query.linkentity?view=dataverse-sdk-latest

Q. Why plugin execution time is 2 minutes in DCRM ?

Ans: Because we have a middleware (mode of plugin sandbox and none) in this first our plugin will be executed and if there is anything wrong with plugin like : infinite loop plugin, hiker need to run their plugin on Microsoft Server before that mode will execute and identify that this plugin is not taking more then two minutes or if it takes more then two minutes it will throw error SQL time error if the plugin execute within two minutes after that Microsoft will allow to run our program to their server.

Q. Why plugin is implementing as a IPLUGIN.

Ans:  Definition of interface is :In Interface it is mandatory to implements all the method inside the interface.

                                                      If we implement a class as IPlugin it means we have to implement all it's method.  IPlugin contain one method call Execute method which takes input as a IServiceProvider. Execute( IServiceProvider).

https://docs.microsoft.com/en-us/dotnet/api/microsoft.xrm.sdk.iplugin?view=dataverse-sdk-latest


Q. How can we add the new field in manage solution once the solution is already in  production in DCRM?

Ans: You need to add the field in unmanaged solution  then export as a manage solution then deploy into each environment then finally deploy into production.

Note: You can't modify manage solution even you can clone a solution and clone a patch.

Q. What is Virtual entity in CRM?

Ans: Once you create the custom entity at that time virtual entity option will be available. It is works when you want to read the data from external system and store in MS Dynamic.

Q. Create the account record using plugin in DCRM?

Ans:  using Microsoft.Xrm.Sdk;

using System;

using System.Collections.Generic;

using System.Linq;

using System.ServiceModel;

using System.Text;

using System.Threading.Tasks;

namespace ClassLibrary1

{

    public class Class1 : IPlugin

    {

        public void Execute(IServiceProvider serviceProvider)

        {

            ITracingService tracingService =

                 (ITracingService)serviceProvider.GetService(typeof(ITracingService));

            IPluginExecutionContext context = (IPluginExecutionContext)

                serviceProvider.GetService(typeof(IPluginExecutionContext));

            if (context.MessageName != "Create")

                return;

            if (context.InputParameters.Contains("Target") &&

                  context.InputParameters["Target"] is Entity)

            {

                Entity entity = (Entity)context.InputParameters["Target"];

                if (entity.LogicalName != "account")

                    return;

                IOrganizationServiceFactory serviceFactory =                   (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));

                IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);

                try

                {

                    if (context.Stage == 40)

                    {

                        Entity newAccount = new Entity("account");

                        newAccount["name"] = "TEST";

                         service.Create(newAccount);

                    }

                }

                catch (Exception ex)

                {                    tracingService.Trace("OnPostUpdate Plugin in the state entity : {0}", ex.ToString());

                }

            }

        }

    }       

}


Q. What is the difference between sandbox and none in plugin registration?

Ans: Sandbox is more secure and some of the actions are restricted in sandbox mode like accessing the file, network protocol, system event log etc but once we register the plugin in sandbox mode even though plugin will be able to access the dynamic CRM services and also plugin will access the azure cloud endpoint.

Q. When we call business rule on server side and client side. with example?

Ans:    Entity account = new Entity("account");

                    account["name"] = "Creation of records through plugin";

                    account["industrycode"] = new OptionSetValue(1);

                    service.Create(account);

Q. How to handle the concurrency in C# plugin?

Ans: If you want to update the same record at same time by two user. In this scenario recent user update will be saved.

Microsoft SDK Provide Concurrency control mechanism while updating and deleting the record respectively.

Code:

//retrieve the only one account record

Entity accountRecord = _service.Retrieve("account", new Guid("00000000-0000-0000-0000-000000000000"), new ColumnSet(true));

//initialize the new object to update the entity.

Entity updateEntity = new Entity();

//update the record

updateEntity.Id= accountRecord.Id;

updateEntity.LogicalName= accountRecord.LogicalName;

//Row version properties to update the records

updateEntity.RowVersion= accoutRecord.RowVersion;

// Update Name

   updateRecord["name"] = "Account Changed";

   UpdateRequest updateReq = new UpdateRequest();

   updateReq.Target = updateRecord;

// Set the Concurrency Behaviour before executing the Update request & match the Row 

// Versions of the record before executing the Request

   updateReq.ConcurrencyBehavior = ConcurrencyBehavior.IfRowVersionMatches;

// Do the update.

   UpdateResponse updateResponse = (UpdateResponse)_service.Execute(updateReq);

Q. How to handle the multi  option set using business rule. for example you have select more then one value but using business rule you need to restrict select multi option just user select only one option using business rule?

Ans:

Q. Write the JavaScript lead creation with phone number if phone number present lead will  create if phone number  not there lead will not create?

Ans: 

Q. What is the primary key and alternative key in DCRM?

Ans: Whenever you create new entity one primary key (GUID) will be created .Alternate keys are not GUID and you can use them to uniquely identify records. You must give a unique name to the alternate key. You can use one or more entity fields to define a key. For example, to identify an account record with an alternate key, you can use the account name and account number.

Q. Which one will trigger first plugin and workflow?

Ans: Normally workflows default execution order is 0 and user cannot be defined that value. 

If user set execution order to 1 in plugin step then real-time workflows will be triggered before the plugins.

If you want to execute plugin before the real-time workflow then you should have to change execution order to 0 in plugin step.

Q. How to call external API from console application in c#?

Ans: protected void Page_Load(object sender, EventArgs e)

{

string strurltest = String.Format("https://jsonplaceholder.typicode.com/posts/1/comments"); 

WebRequest requestObjGet = WebRequest.Create(strurltest);

requestObjGet.Method = "GET";

HttpWebResponse response0bjGet = null;

responseObjGet

= (HttpWebResponse) requestObjGet.GetResponse();

string strresulttest = null;

using (Stream stream = response0bjGet.GetResponseStream())

StreamReader sr = new StreamReader(stream); 

strresulttest = sr.ReadToEnd();

sr.Close();

}

Q. In how many way you can create the lead records in DCRM?

Ans: First from lead entity. Second from import the lead record. Third from quick lead form. Forth from clonE the lead record.

Q. Can Business Rule run on server side. if  yes Please give the example?

Ans: public class ServerSideBusinessRule : IPlugin

    {

        public void Execute(IServiceProvider serviceProvider)

        {

            try

            {

                IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));

                if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)

                {

                    IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));

                    IOrganizationService service = factory.CreateOrganizationService(context.UserId);

                    ITracingService tracing = (ITracingService)serviceProvider.GetService(typeof(ITracingService));

                    Entity account = new Entity("account");

                    account["name"] = "Creation of records through plugin";

                    account["industrycode"] = new OptionSetValue(1);

                    service.Create(account);

                }

            }

            catch(Exception ex)

            {

                throw new InvalidPluginExecutionException("An error occured in  Plugin: " + ex.Message.ToString(), ex);

            }

        }

    }




Q. Depth example in DCRM?

Ans: IExecutionContext.Depth properties tell you how depth is plugin. if the depth is 1 means plugin has been trigger by user and if the depth is 2 means one plugin is trigger another plugin for example update contact entity trigger by another entity.

Q. What is the environment variable in Power Automate?

Ans: While creating flow we have option to select value dynamic that dynamic value is nothing but environment variable.



Q. How to establish the connection between SQL Server (On premise) to get the data to get information in power automate ?

Ans: This can be achieve by On Premise data gateway. Some connectors, such as the SharePoint connector SQL Server, support on-premises data gateways.

We are going to look at making a connection to an on-premises SQL database.

To begin, you need to install Gateway on a machine that is in the same network as SQL Server. This machine should always be on and always connected to the internet. Download Gateway Installer and follow the prompts to complete the installation process.

When prompted to register the gateway, make sure you use the same credentials that were used to sign-in to Microsoft Flow.

Now goto power automate app from left side under data connection and new connection and select the SQL.




Now Select the "Connect through on premises data gateway" checkbox. Next, provide the server name, database name, credentials and please ensure that the correct gateway is selected or not if not please select the correct gateway.



Q. Why you are creating custom entity as ownership team/user in DCRM?

Ans: Once you select ownership of entity as team/user crm will add some of the additional filed as well like ownerid, owningbusinessunit, owningteam, owninguser. Reason is why all above filed got created because of security role and five access level.

  • Global
  • Deep
  • Local
  • Basic
  • None

You must record the user/team business unit so that the security role can determine what records other users can see.

If you have selected the organization level of entity ownership then it has two access levels None and Global.

Organization ownership means that the entity will not have an owner field or any other user/team/business entity lookups. global or none visibility means that the entity will ignore users' business units

Q. What is Multilevel Inheritance and Multiclass Inheritance In DCRM?

Ans: When one class inherits another class which is further inherited by another class, it is known as multi level inheritance in C#. Inheritance is transitive so the final derived class inherits all the members of all its base classes.

Code:

using System;  

   public class Human  

    {  

       public void eat() { Console.WriteLine("Eating..."); }  

   }  

   public class Ladies: Human  

   {  

       public void speak() { Console.WriteLine("Barking..."); }  

   }  

   public class kids : Ladies  

   {  

       public void cry() { Console.WriteLine("Weeping..."); }  

   }  

   class TestInheritance2{  

       public static void Main(string[] args)  

        {  

            kids d1 = new kids();  

            d1.eat();  

            d1.speak();  

            d1.cry();  

        }  

    }  

Q. Once image is add in SharePoint send the mail through power automate ?

Ans: Copy your site collection and go to power automate create a flow.



Q. Difference between Action and Workflow in CRM?

Ans: Important Facts: 

Custom workflows cannot be run independently because they are treated as a process step inside a CRM workflow or dialog.

There is no guarantee in workflows to control when and in what order each custom workflow activity runs, but plugins have an execution order to set.

When should you use custom workflow over plugin?

When execution speed, process security and data validity are integral, I choose plugins.

When flexibility, reuse of functionality, and optional user participation are integral, I choose workflows.

Example Of Customs Workflow:

A user deactivates any entity record I want to deactivate any child entities. This can be achieved through custom workflows. The reason I choose a custom workflow over a plugin is its reusability.

User enters date of birth and you want system to calculate age and display in form then you can trigger a custom workflow.

Action:

Action don't support the Scope it is running organization level. action can be invoked by plugin, JavaScript, workflow, web API, console application.


Q. What is the difference between Business Process Flow and Workflow?

Ans: BPF is different from workflow, it requires user to interact and users are responsible for their action, user should be trained to understand BPF and all process of BPF.

BPF is visualized for the user by the UI whereas workflow is not visualized for the user.  

You should use business rules when you need to apply client side rules on fields for validation, hiding and displaying fields etc. instead of using JScript they only fire on the record that is open

Workflows are triggered on a specific entity, but can execute logic on related records, and can be either synchronous or asynchronous, they are typically used against system wide updates and automation, and to perform more complex operations. You can also call custom plugin activities for complex scenario.

Using workflow we can send mail etc. Which we cannot do through Business Process.


Q. What is the limitation of business process flow in DCRM?

Ans: There cannot be more than 10 active business process flow processes per unit.

Each process cannot have more than 30 steps.

Q. You have once account entity and their respective contact as well. Take one account and make a sub grid under that account as a contact and you have one button as well on sub grid level once you click on that it will show only Male records. Once again you click it will show all the female record.

Ans: First go for account entity from  and make a sub grid and provide the detail.


 Now you can able to get all the related contact of account.



Now you need to install ribbon workbench custom button and based on  the filter criteria make the contact male or female on gender filed.

We need to filter the male and female record based on the addPreSearch and addRemove.

Q. What is the inheritance?

Ans: It is allowing to create new class from existing class. The derived class inherits the fields and methods of the base class. It helps with code reusability in C#.

Q. What is the difference between Canvas Apps and Model Driven Apps in DCRM?

Ans: There is a need to implement and develop model-driven apps, Dynamics 365 product license.

develop canvas app one needs, power platform license Required roles and permissions in data verse.

Model-driven apps can only connect to one data connector which is a data verse.

Canvas apps can connect to and interact with over 350+ connectors

Logic implementation in model driven app like Business Rules, Workflows, Actions, Plugins

Logic implementation in canvas app excel formula and condition check.

Q. Do we connect salesforce from Canvas Apps?

Ans: Yes

Q. What is the bridge between PowerApps and Customer Engagement ?

Ans: 

Q. What is the Component in DCRM?

Ans: Loyalty, Satisfaction, Income, customer retention.

Q. How to call one follow(cloud follow) from another follow(cloud follow) in DCRM?

Ans: https://juniorcrmblog.blogspot.com/2022/05/trigger-one-flow-from-other-in-power.html

Q. What is auditing whether auditing is impact on the performance in DCRM?

Ans: The audit detects deficiencies in the use of CRM software, problems with the data quality of the information captured.

Q. Can we register post operation, pre operation, pre validation on asynchronous plugin in DCRM?

Ans:  You cannot have PreOperation or PreValidation plugin steps running asynchronously. 

Q. Write the plugin for duplicate deduction ?

Ans: if (entity.Attributes.Contains("emailaddress1"))

{
string email = entity.GetAttributeValue<string>("emailaddress1").ToString();
//handle the above line of code accordingly based on dataType(String, EntityReference, Datetime etc.)
QueryExpression contactQuery = new QueryExpression("contact");
contactQuery.ColumnSet = new ColumnSet("emailaddress1");
contactQuery.Criteria.AddCondition("emailaddress1", ConditionOperator.Equal, email);
EntityCollection contactColl = service.RetrieveMultiple(contactQuery);
if (contactColl.Entities.Count > 0)
{
throw new Exception("Duplicates found !!!");
}
}

Q. What is the limitation of link entity in DCRM?

Ans: 10 

Q. What is the field level Security Role?

Ans: 

Q. How to provide the access of a particular user a part of security role or from environment adding user?

Ans:

Q. I don't have access of particular entity whether I will  get the email or task of particular entity ?

Ans: No

Q. Explain the high level security design in DCRM ?

Ans: 

Q. You have created one custom entity under that one filed and your solution is in production but at some moment client said delete the custom entity from production how will you do that?

Ans:  First we will create one solution and add the all the filed and removed that particular entity from that solution we will export as a manage solution and deploy in production as a update.

Q. What is the core of solution?

Ans:

Q. What type of client you will suggest for online and on premise ?

Ans:

Q. Let's assume you have created one security role with child business unit (B) in your organization. There is one requirements to create one solution and add that particular one security role into solution, would you able to add the security role ?

Ans: No

Q. How to find CRM version ?

 Ans; Go to setting gear button select the about option under that. For your reference please check the below screen shot. 



Q. What are the things you can do with business rule not with JS in DCRM?

Ans: Business rules run only when the form loads and when field values change. They do not run when a record is saved.

Business rules work only with fields. If you need to interact with other visible elements, such as tabs and sections, within the form you need use form scripts.

If a business rule references a field that is not present on a form, the rule will simply not run. There will be no error message.

Whole Number fields that use the formats for Time Zone, Duration, or Language will not appear in the rule editor for conditions or actions, so they cannot be used with business rules.

Q. On which event you have to make relationship between two custom entity in plugin?

Ans: "service. Associate" event.

Q. How to create the auto number of case id in DCRM?

Ans: I have created one filed "current Number" (Data Type as a single line of text)In configuration setting entity. Please refer the link :https://youtu.be/bisoBaAFIXc

Q. How to filter the lookup record based on the option set value in MS Dynamic CRM?

Ans:  




onChangeSportsType: function (executionContext)

var formContext = executionContext.getFormContext();

if (formContext.getAttribute("new_sportstype").getValue() != null)

{

formContext.getControl("new_bestplayer").addPreSearch (filterlookup);

}

else

{

formContext.getControl("new_bestplayer").removePreSearch (filterlookup);

}


filter lookup: function(executionContext)


if (formContext.getAttribute("new_sportstype").getValue() == 108730000 / Cricket */)


var filter = "<filter> <condition attribute 'new_playersports' operator = 'eq' value='Cricket' /></filter>";


formContext.getControl ("new_bestplayer").addCustomFilter(filter);


}


else if (formContext.getAttribute("new_sportstype").getValue() == 108730001 / Basketball */)


var filter"<filter> <condition attribute 'new playersports' operator= 'eq' value='Basketball' formContext.getControl("new_bestplayer").addCustomFilter(filter); /></filter>";


}


if (formContext.getAttribute("new_sportstype").getValue() 108730002 / Soccer /)


var filter = "<filter> <condition attribute 'new playersports' operator = 'eq' value='Soccer' formContext.getControl("new_bestplayer").addCustomFilter(filter); /></filter>";


}

Q. How to trigger the workflow using custom ribbon button in DCRM?

Ans:  I have create video on this please go through this link:https://youtu.be/6CzZ7-Qmlpc 

Q. Lets assume User 'A' and User 'B' both have same security role and same organization but User 'A' can only see the 50 records but User 'B' can see the 100 records How?

Ans: Because of business unit.

Q. Real Scenario example of N:N and 1:N relationship ?

Ans: N:N : Students And Teacher.

students can take the class from more than one teacher and teacher can teach the more than one students.

        1:N :  Country(India) and State.

All state will have only one prime minister.

Q. What is the field level security?

Ans: It is the standards level of security in which you can define the security name and add the user or team  and provide the security role like read, create, update.  

Q. What is the date and time stamp?

Ans: Date Only: A, B work in sales department. A create contact record in New York (GMT-5) with birthday (4/1/1970) assign to B. When B open the records with (GMT-8) it was same regardless of location means time zone is not required.

        Time Zone Independent: Hotel checking reservation. if you are in New York and booking room in different country then order will be booked with what date and time you have provide.

        User Only: It will take user system date and time.

Q. What is the solution why do we used?

Ans: A solution is the bucket where all the customization components for a particular project are stored. Creating a solution help in moving these components from one environment to another.  

Q. What is the plugin and their steps?

Ans: Objective is to enhance or modify the standard features/behavior of Dynamics 365 by injecting custom business logic into the execution of nearly any task a user performs. plug-in code runs in CRM server(s), either synchronously or asynchronously.

Steps:-

  • Open Visual Studio and open a new Class Library (.NET Framework) project using .NET Framework 
  • Rename the class file appropriately
  • Install NuGet package - Microsoft.CrmSdk.CoreAssemblies and install latest version
  • Include using Microsoft.Xrm.Sdk;
  • Implement the Execute method from IPlugin interface which takes IServiceProvider as parameter
  • Obtain the ITracingService object using the GetService method of IServiceProvider.
  • Obtain the IPluginExecutionContext object using the GetService method of IServiceProvider.
  • Create object of IOrganizationServiceFactory using the IServiceProvider object.
  • Create object of IOrganizationService using the IOrganizationServiceFactory object.
  • Add business logic
  • Exception handling
  • Once development is complete, sign the assembly (one time process)

Q. How to hide and show the custom button based on security role through ribbon workbench and mention the step name as well?

Ans: Create a solution in which create a custom entity or else you can use exiting solution and exiting entity. Open the ribbon work bench and select the solution then select the entity, drag the button on which area you want to show up like header, form grid etc. 

Let's start with scenario if user is having security role sales person then he will be able to see the button otherwise not at all.

Step:  Open ribbon work bench and select the entity then drag the button (Button name is showbutton).

          Now we need to add the command and enable the rule for button.

          Enable rule are used as trigger when our buttons will enable for form.

          click on showbutton enable rule and click on add step and choose FormStateRule.



          Use existing because we want show this button after the record is created. Set invert rule as false,             it means if the form is “Existing” type then button will not hide automatically.

          Now we have to write custom rule that will check the user security role and based on the user                  security role we will return true or false from the function.

          Now create a web resource and add this js in your web resource and publish and return back to                the ribbon work bench 

     function   showHideButton(executionContext){

          debugger;

          var  value = false;

          var   formContext = executionContext.getFormContext();

          var userRole = Xrm.Utility.getGlobalContext().userSettings;

          if(userRole.ToLowerCase =="salesforce" ){

             value = true;

             break; 
}

}

Now add the new step in enable rule and select the custom rule.


Now enable rule is done. add the enable rule to respected command. once you added then specify the action what do you want to do after click on button.                                                                                                                                                                            

Q. How many ways to shared the records in DCRM

Ans:  a) Once you click on share button of any records 

          b) Advance find 

          c) Import/Export

Q. What is the queue and their types?

Ans: Queue help your organization to monitoring your work like attention, pending, priority works etc. Queues are associate with specific user or team. By default, a queue is created for each user and team in Dynamics 365 Customer Service. You can use this default queue to track all your work items, or you can set up queues to reflect your organization's structure, business processes, or both.

You can create two types of queue:-

       a) Public Queue:- All user can see and access this queue depending on their security role. user can pick the ticket and assign to the personal queue.

       b) Private Queue:- This queue are visible only to the user who have been designed as a queue member.

Q. What is the action in DCRM & CRM?

Ans: Workflow, Dialogue, Action.

Q. Please specify the different way to assign the records apart of click on assign button?

Ans: Advance find, Import/Export.

Q. What is the difference between asynchronous and synchronous workflow?

Ans:  a) let's assume in synchronous workflow it's got failed in between and it will not check rest of the condition and throw error on UI but in asynchronous workflow it's got failed in between even though it will execute all the condition. 

          b)Synchronous workflow throw error on UI but asynchronous workflow you have to go in system job.

          c) If you trigger a workflow as a synchronous then UI will be freeze until it's finished. but if you trigger a workflow as a asynchronous it will be executed in background and you can do whatever you want.

Q. Why do we choosing online CRM?

Ans: Because we can access the CRM online from anywhere or any device. Heavy IT lifting is taking care by Microsoft or third party service provider. How much service are you using you need to pay for that only. data transfer is bit late compare to the on premise. 

Q. What is the difference between manage and un-manage solution?

Ans: sentence itself is telling manage means it is already intended to distribute but unmanage solution means it is still under development.

If you want to delete manage solution it will be deleted all the related components within solution but if you want to delete unmanned solution it will be deleted but related components still will be there.

If you want to delete a component from manage solution you will not able to delete but in un-manage solution if you want to delete a component you will able to delete but that components is not related to the other components.

Q. What is the sales process in d365?

Ans: Let's assume marketing people advertising a product on social media, Television etc. If anyone interest on that product he/she may leave his/her information now marketing people take that information and provide to the sales people from here sale people create a lead into the system and start follow up with call, mail, fax etc. to the respective people now if people with agree then sale people create opportunity in to the system and add the product details, Price list, Discount etc. then create quote and send to the costumer. Now opportunity may be lost or won if it is Lost sale people will keep the information into database for further campaign if opportunity is won then sales people create the invoice and place the order to the costumer. From here now service people will take care.

Q. What is the relationship and their behavior ?

Ans: We have three types of relationship. one to one, one to many, many to many.

Now each relationship has on behavior.

Parents: If you want to delete the parents records then related child records will be deleted. if you want to share the parents records then related child records will be shared. 

Referential: If you want to delete the parents record then child record will be deleted but link between parents and child will be null. 

Referential restrict: If you want to delete the parents records then child records will be deleted but if child records are exit then parent records will be not deleted. 

Q. What is the new feature of D365 UI?

Ans:  Editable Grids, Duplicate Detection, Case Routing, Mobile Experience,  Forecasting. SLA Experience etc.

Q. What is the business rule and it's features?

Ans: Code free way to configure the action based on conditions to apply validation/logic(Set field value, Clear field value, Set the recommendation, validate and show the error message, show/hide the value, set the field requirement level) to form in dynamic CRM.

Features: 

No need to write any code(JavaScript/plugin).

simple interface (drag/drop).

Easy to implement and easy to maintain fast changing and commonly used rule.

can be applied to main and quick create form.

take Snapshot of business rule from action bar

Q. I have written one plugin and register the step but plugin is not at all triggering why?

Ans: Because I am not triggering on the specific entity on which I have written the plugin that is way it is not at all triggering the plugin.

Q. How to hide/show the field based on security role?

Ans:

 function hide(primaryControl)

{

debugger;

        var currentUserRoles = primaryControl._globalContext._userSettings.securityRoles;

        var roleId = "AA714CFC-8934-EC11-8C64-000D3AF035BD"; // Subscription Manager role

        roleId = roleId.toLowerCase();

        // Get all the roles of the Logged in User.

         

        for (var i = 0; i < currentUserRoles.length; i++) {

            var userRoleId = currentUserRoles[i];

            if (userRoleId == roleId) {

                // Return true if the Role matches

                return true;

            }

        }

        return false;

}

Q. How to pass executinContext in ribbon workbench in DCRM?

Ans: We have add parameter on that list we have one option call  CRM Parameter and will chose the Primary Control.



Q. What is the Project management process in your project?

Ans: We are following Agile process in our project.

1. Requirement.

2. Design

3. Develop

4. Test

5. Deployment

6. UAT (User Acceptance Test)



Q. How to pass the parameter from one plugin to another plugin?

Ans:

Q. What are the step condition available in workflow?

Q. What are the  triggering event available in workflow?

Q. What is the rest builder API?

Q. Difference between quick view and quick create?

Ans: A Quick View form can be added to another form as a Quick View control. It provides a template for viewing information about related entity records within the form for another entity record. This means your app users don't have to navigate to a different record to see the information they need to do their job.

In Dynamics 365 Customer Engagement (on-premises), quick create forms appear when you select the Create button in the navigation bar or when you select + New when creating a new record from a lookup or subgrid. The Customer Engagement customer engagement mobile apps use quick creation forms to create new records.

Q. What all views are available in DCRM?

Ans: There are three types of views: personalsystem, and public.

Q. What is the query expiration and limitation in DCRM?

Q. How to triggers the plugin with the help of button in DCRM?

Q. What is the publisher?

Ans: A publisher might be a person name or company name to whom will connect if anything went wrong with solution.

Default name of publisher is prefix is new but custom prefix for publisher is any custom name.

Q. What all types of privileges available in DCRM?

Q. What is the difference between plugin and workflow?

Q. I have one solution which is depends on another solution is there any way to delete the solution?

Q. Difference between calculate field and roll up field in DCRM?

Q. How to write the js code to add the records in lookup ?

Q. How to give maximum and minimum field length of a particular field without using code?

Q. What is the security in DCRM?

Q. What is the clone and patch in DCRM?

Q. Write any update plugin program and describe the step as well?

Q. Have you worked on Reporting tools if yes please tell how to create the reports?

Q. There is one plugin on create and workflow on create which one will trigger first and why?

Q. I have created one records and assigned the user but use is not able to see the records why ?

Q. What is the security model?

Q. I have created one business process but I am not able to see the business process why?

Q. Have done any third party integration with DCRM?

Q. I have one entity called X and having two field with option set value (let's assume CGI, Infosys, Capgemini are company name of options set drop down value and second option set value are CI, IY, CAP  the code of company) once I select the CGI automatically CI will be selected. How to do ? 

Q. What is the plugin and why we are using ?

Q. What is the power automate and power platform?

Q. What is the workflow and why we are using ?

Q. What is the difference between OData and Rest web services?

Q. Standard behavior of solution in DCRM?

Q. What is the difference between pre-operation and pre-image?

Q. What all things we can do with business rule but not with JavaScript in DCRM?

Q. Can we register the delete plugin for post operation?

Q. Can we have pre-image on create plugin?

Q. What is the meaning from and entity scope in business rule?

Q. I have opportunity but I am not able to see the product in opportunity what would be problem?

Q. I have one entity called account but in lookup field I am not able to see the related account what privilege's I am missing (ex- account form I have primary contact but I am not able to see the related primary contacts information)?

Q. I have one custom entity how to prevent the entity to be deleted by other user with the help of workflow?

Q. What is the event pipe line please describe the each step?

Q. What is the difference between pre-operation and post-operation plugin?

Q. What is the difference between pre-validation and pre-operation plugin? 

Q. What is the early binding and late binding?

Q. Register  the pre-image and post-image plugin ?

Q. What is the email routing?

Q. How do we call the workflow through JavaScript ?

Q. Explain, How do we save the web resource service call in pre-operation instead of post operation?

Q. How to create an opportunity while clicking on custom button in DCRM?

Q. I have 4 user license and added 4 users but what happened if I added 5tt user in DCRM?

Ans: On the time of environment creation, we have option to check product license please see the below screenshot. 


Now I have added 25 users once I added 25th users all are in active mode. while adding 26 records, we are unable add 26th user because no license is available 

now still I want to add the user let see what will happen?

I have chosen second option create user without license and create the user successfully.



while adding the user into environment it will give error below.


Note: Before we are knowing that once we create the user more than license number then user will create, and it will be in disabled state.




Q. What is the difference between System dashboard and interactive dashboard in dcrm?

Ans:

Q. Can we do validation on BPF in DCRM?

Q. How can we use execution context in HTML TAG?

Q. What is the entitlement in SLA ?

Q. What is the life cycle of service filed in DCRM?

Q. How can you embed canvas app in model driven app in DCRM?

Q. What is the difference between get and post method ?

Q. What is the difference between method override and method overloading ?

Q. Input and Output parameter in Action?

Q. How to move duplicate detection rule from one environment to another environment in DCRM?

Q. Can we change the form color in DCRM?

Q. Can we able to see the  sub grid of account in Mobile phone?

Q. Can we provide the access team of custom entity in DCRM?

Q. I have create one custom entity but I am not able to see that entity in UI why?

Q. Can we create the custom button on dashboard?

Q. Have you used pre-image in custom workflow?

Q. Can we export the default solution?

Q. Have you integrate the d365 to any social media platform?

Q. We have by default manage solution and we have custom manage solution generally we can't delete the mange solution but how can we edit and extend the behavior of manage solution.

Q. What is the difference between custom plugin and customs workflow in DCRM?

Q. What is the line item in DCRM?

Q. What is the price list in DCRM?

Q. If user is getting error in plugin but your plugin is already in production. how to identify the error and how to debug ?

Q. How to do based on the first lookup field second lookup field will be populated in same form?

Q. I have created one workflow and that workflow is created one task but user informed that he is not able see the task why?

Q. Which solution is faster while importing the solution update or upgrade in DCRM?

Q. What is the limitation of fetch XML? 

Q. How to debug the JavaScript?

Q. What is the best approach to write the C# code?

Q. How to enable CRM tracing?

Q. I have created one entity for that I am not able to see the access level like "parent-child", ownership why?

Q. How to change the execution order of plugin and workflow?

Q. What is the maximum value of multiline text in DCRM?

Q. What is the discovery services ?

Q. What is  the metadata?

Q. How do we create the costume entity records using SDK?

Q. What is the maximum number of tab allow in DCRM?

Q. What table is affected while create the new records?

Q. Once we customize the solution component and import as unmanage solution. can we roll back all customization component ?

Q. How to join the two table using query expression?

Q. Where CRM option set value is stored in SQL server?

Q. Once the plugin execution time gets over. is there any alternative way to run the plugin?

Q. What is the owner team and access team?

Q. Can we create the dashboard of log file?

Q. What is the new release in d365? 

Q. How to set the requirement filed through js ?

Ans: 

formContex.getAttribute("name of field").setRequiredLevel("none"); //Not Required

formContex.getAttribute("name of field").setRequiredLevel("recommended"); //Business Recommended

formContex.getAttribute("name of field").setRequiredLevel("required"); // Business Required

Q. What is the limitation of shared variable ?

Ans: 

Q. What is the value type and reference type?

Ans: Data types can be divided into two categories: value types and reference types. The value of a value type is the actual value. A value of reference type is a reference to another value.

Q. How to call the web API?

Ans: 

Q. What is the interface of custom workflow ?

Ans: codeActiviy

Q. Where your C# code store in your company?

Ans: Azure Devops.

Q. How to provide cross business unit security role for same user?

Ans: https://community.dynamics.com/365/f/dynamics-365-general-forum/386040/give-cross-access-roles-to-business-units-users


I need to assign the permissions of Test1 to the users of Test2.

Then we need to create an owner team of Test1 and a security role of Test1 let's assume security role is lead 1 has been created. Assign this security role to this team.

Finally, we add the users of Test2 to this team. In this way, Test2 users can access Leads of Test1.

If you want to allow Test1 users to access Leads of Test2, just create a Test2 security role and team, and add Test1 users to this team.


Q. What is the plugin execution pipeline in DCRM?

Ans: When a plugin run. It is execute based on pipeline orders. We have four pipelines order.

Pre-Validation: Execute even before basic validation(security check means this stage will trigger no matter user is having privilege's or not to create, update etc.). It is trigger before database operation or even before security check. 

Example: If you are creating one task of an account but in later stage means pre operation occurred error saying that you don't have enough security role then records creation will stop. whatever you done it in pre validation it won't be roll back.

If there is one case where parent records are deleted and related child records as well(relation is parental)? In this case child records are available on pre validation stage.

Note: This stage is pre validation it should be synchronous not asynchronous.

 Pre-Operation: In this stage if you want to change/update the records you can do it in pre operation. if you do change/update records in post operation we will add extra web service call. This stage will execute after the validation but before the change has be to committed to the database.                           

Example use –to prepopulate values; “update” plug-in to update the same record - best practice to use the pre-operation stage -plug-in update is done within same DB transaction without needing additional web service update call.

Main-Operation:  Plugin can't be registered in this stage. It is used for internal only.

Post Operation: Execute after database operation are completed. This operation will be synchronous and asynchronous as well. This will execute within transaction. 

Example: “create” plugin - This allows access to the created GUID and creation of relationships to newly created

Q. What is the image and their use in CRM?

Ans: Plug-In images are snapshots of the entity’s attributes, before and after the core system.

Uses: update plug-in target entity only contains the updated attributes, if logic needs other attribute values, then we can use images. 

Comparison of data before and after change.


In above picture we can't register the pre-image and post-image on create plugin pre stage like same we can't register the pre-image on create plugin post stage but we can register the post image on create plugin post stage.

Q. What is the early binding and late binding in CRM?

Ans: Early binding refers to the compile time and late binding refers to the run time. 

While early Binding, methods, functions and properties which are checked during compile time and perform an action before application executes. advantage of using early binding is for performance and ease of development.

While late Binding, methods, functions and properties which are checked during run time and perform an action after application executes. advantage of using late binding is that object of this type can hold reference of other object and it is more flexible than early binding.

Q. How to debug the plugin?

Ans: Plugin execute on server side and you can't attach a debugger to the plugin in process. The plug-in profiler captures a profile of an executing plug-in and allows you to re-play the execution of the plug-in using Visual Studio on your local computer.

Step 1: In plugin registration tool, click install profiler


Step 2: Select the step which you want to debug in registration tool and click on start profiler.


Step 3: On you click on start profiler you will get pop up dialogue and click ok.


Step 4: Capture the profiler. let's assumed I have one plugin on create an account and registered the plugin. This will capture an instance of the plug-in executing.

Step 5: Click on debug in replay plugin execution dialoged, on setup tab click on arrow symbol to open the select profile from CRM dialogue. specify the assembly while click on (...) and take the location of .DLL.  

Step 7: In visual studio, give the break point in plugin class. Now click on debug and attach process   

Step 8: Select the pluginRegistraion.exe and click on attach.

Step 9: In the Replay Plug-in Execution dialog, click Start Execution. In your Visual Studio project, you should see that the code is paused at the breakpoint you set earlier.

Q. When infinite loop occurs in plugin? How do you avoid infinite loops in the plugin code?

Ans: Assume your CRM implementation consists of the Contact and a custom entity called Member. The requirement for the system is to keep data on the Contact and Member entities synchronized, so that the following business rules apply:     

a).When a Member is created, a corresponding Contact record is created (if one does not already exist).

b).When certain details on the Member is updated, details on the corresponding Contact record must also be updated.

c).When certain details on the Contact record is updated, details on the corresponding Member record must also be updated

You can see that this type of business logic will require a plugin to be registered on create of Member, and on update of both Contact and Member. You will also notice that updating a Member triggers an update of the Contact, which again triggers an update of the Member and so on.

Firstly, let’s see what happens if we deploy such a plugin without any consideration for handling infinite loops. I have updated the “Full Name” field on the Member, which should try to update the “Full Name” field on the Contact.


The CRM platform throws an error stating that it has identified an infinite loop. This usually happens after the number of iterations reaches a maximum of 8. We can fix this by adding a depth check at the start of our plugin code, just after we initialize each of the service objects.

IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));

IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));

_sdk = factory.CreateOrganizationService(context.UserId);

ITracingService tracer = (ITracingService)serviceProvider.GetService(typeof(ITracingService));

if (context.Depth > 1) { return; }


Notice that last line which checks if the plugin has run more than once, and if so, executes a return statement to cancel out of the plugin. Now when we run the plugin, we shouldn’t run into an infinite loop.

Q. If you delete a record from UI, what happens in the database. can you bring the record back?

Ans: There is no way to recover the records unit we have database to recover deleted records. 

Q. What is deletion service? can you change its schedule?

Ans: Whenever you deleted any entity it will be deleted permanently from CRM system by the deletion services. Deletion services run asynchronously once in a day. With the help of job editor tool you can change the schedule of deletion services.

Q. Difference between plugin and workflow?

Ans: 

Plugin                                                                        

More number of trigger like addToQueue, CloseAsWon  etc.                                                                                                                                                                           

plugin can trigger the event on stages like pre-validation, for some of pre-operation, post-operation.                                                 

Cannot be triggered manually, can only be triggered on-demand) or through event .                                                                       

Plugin Are triggered by the message and no restriction on execute Scope. within specific organizational scopes (ie. Org, BU, Parent and Child BUs,  or for the Owner only).

Plugin can only be unregistered.                                                                                                                                                    

Plugins are richer in feature in terms of triggers, flexibility, execution ordering, which makes very high level and optional user of control over the operation and flexibility.                          

Workflow

Workflow only have few number  trigger like create, status etc.

 limitations of Pre-event stages  the main events like delete has only before.

Can be triggered manually or can be triggered by event.

Can be limited to automatically within specific.

workflow unpublished and deactivate easily.

Workflows are to be used when functionality reuse, involvement are integral.


Q. How many types of plugin deployment in CRM.

Ans: We have three types of plugin deployment in DCRM. a) GAC b) Disk c) Database.

A) GAC (Global Assembly Catch)

Plugin store in a GAC does not support in dynamic 365 online.

Plugin does not backed up with database. Plugin assembly store in GAC server.

You can't add your plugin within solution which means you always have to copy  and register DLL when you want to deploy in another environment.

B) Disk Deployment 

Plugin store in a Disk Deployment does not support in dynamic 365 online. 

Plugin does not backed up with database. Plugin assembly store in GAC server.

You can't add your plugin within solution which means you always have to copy  and register dll when you want to deploy in another environment.

C) Data Base

This deployment type support both dynamic 365 and on premise.

Plugin is secure and store in Microsoft dynamic CRM  365 itself. You can backup and restore the database with plugin.

  

Q. Difference between Secure & Unsecured Config?

Ans: If you are using a value in plugin and want to share the value from one environment to the another environment it would be change so we will keep the secure d because no body read the value. if we are using a value which is not changed and it would be fixed across the environment then we will keep unsecure because any one can see the value example like: keyword.

Q. Can we pass data between two plugins in DCRM?

Ans: Yes, it is done via IPluginExecutionContext property called shared variable. This properties is a collection of key/value pair. User use to share data between plugin which are registered on both pre and post event.

Example: public class Pre-Operation : IPlugin

                {

                     public void execute(IServiceProvider    serviceProvider)

                             IPluginExecutionContext   context = IPluginExecutionContext;

                      GUID   contact= new GUID ("45678-12345-12345.....");

                      context.SharedVariable.Add("PramaryContact", (Object)contact.toString());

               }

               }

              public class Post-operation : IPlugin

              {

                    public void execute(IServiceProvider    serviceProvider)

                             IPluginExecutionContext   context = IPluginExecutionContext;

               if(context.SharedVariable.contain("PrimaryContact"))

                  {

              GUID contact=new GUID (String) context.SharedVariable["PrimaryContact"];

              // Do Something with contact;

}

}


Q. Can we register the on-premise plugin in sandbox mode?

Ans: No, Because only CRM online plugin run on sandbox mode. 

Q. Different mode of plugin?

Ans: We have two mode in plugin registration tools. 

a) Sandbox : For online plugin run

b)None: For on-premise plugin run.

Q. Why do we need to create security key before register the plugin?

Ans:  It is create unique identify for assembly so that assembly can't be conflicted.

Q. What interface we use a plugin to inherit CRM Services?

Ans: IPlugin.

Q. Importance of Secondary Entity in plugin registration tool?

Ans: if we want to trigger the related entity then we go for second entity in plugin registration tool example: if  we want to trigger state entity as well as city (relation between state and city is 1:N) in primary entity I will take state and related entity (Secondary) will be city.  

Q. What security roles need to register the plugin in Online and on-premise both?

Ans: System Admin.

Q. What is filtering Attribute in CRM Plugin Registration Tool?

Ans: Filtering is nothing but on which field value plugin will be triggered. Let's assume you are register the pre-image or post-image on fax field. once the field(fax) value change then plugin will trigger.

Q. What is Tracing Service in Plugin?

Ans: It is tells us up to what line program gets executed successfully. Let's assume your program is running in production and it's got failed then with the help of ITracingService you can find out where it is failing.

Q. What is the Target Entity, Input and Output Parameter in Plugin?

Ans: Target Entity:  While register the plugin step that primary entity is nothing but target entity. while implement the class with IPlugin that contain execute method which take input as a serviceProvider then we can create an instance of IPluginExecutionContext and stored in context like below

       IPluginExecutionContext        context=  (IPluginExecutionContext)                                                                                                            serviceProvider.GetService(typeof(IPluginExecutionContext));


now with the help of context you will be able to get all the input parameter which are transfer from plugin and primary entity is accessible by target within input parameter.


       Input Parameter:  IPluginExecutionContext        context=  (IPluginExecutionContext)                                                                                                            serviceProvider.GetService(typeof(IPluginExecutionContext));

                   with the help of context you will get all types of message like below:

                    context.MessageName;

       Note: Within the and Pre-Operation stages, you can read and change the values of the Input-Parameters so that you can control the expected outcome of the data operation. If you find that the values in the Input Parameters collection represent a condition that you cannot  allow, you can throw an InvalidPluginExecutionException (preferably in the Pre-Validation stage) that will  cancel the operation and display an error to the user with a synchronous plug-in, or log the error if the plug-in is asynchronous.

  Output Parameter:  The Output Parameters are not populated until after the database transaction, so they are only available for plug-ins registered in the Post Operation stage. If you want to change the values returned by the operation, you can modify them within the Output Parameters. 


Q. What is the difference between query expression and fetch xml?

Ans:   Query Expression: A query expression is used to search for records for a single   entity type. Queries are built as an object model. This class supports all   the features in Fetch XML except for aggregates and grouping. It also supports   both early and late bound entity programming styles. query expression Retrieval record limit is 5K


          Fetch XML : Fetch queries can return records for multiple entities. use this query when you need support for aggregates and grouping or   you need to save the query.

Q. What is the Execution Time of Synchronous  and Asynchronous plugin in CRM?

Ans:  2 minutes 

Q. Which will execute first in Asynchronous  Workflow and Asynchronous Plugin?

Ans:   

Q.  How can we call external web service in Online plugin CRM?    

Ans: 1. Create a new Web Service(Do not need any logical code here, this WS will be used as an intermediary WS)

2. Add the IP address reference from the another Web Service into your new Web Service.

3. Add the reference from your new Web Service into your plugin code.

4. Create a method to pass the data that came from your plugin to the another Web Service.

Host the WS as well.


Q. What are the different ways available to debug a Plugin ( Online both)?

Ans: Plug-in Registration tool and power platform tools.

Q. Can we register on-premise plugin in Sandbox mode?

Ans: No

Q. Why online plugin has to be registered in sandbox mode only?

Ans: The sandbox is more secure and some actions are restricted. When a plugin is registered in a sandbox mode, although a plugin can still access the Dynamics CRM organization  service and execute requests in accordance with Dynamics SDK, some of the functionalities such as accessing database or file directory are restricted. However, the plugin will still be able to access Azure Cloud Services endpoint.

Q. What are the different storage locations available to store a plugin?

Ans: A) GAC (Global Assembly Catch).
          B) Disk Deployment.
          C) Data Base.

Q. What information can we get from Plugin Context??

Ans: It's contain the information about the plugin pipe line and entity business information at run time like who is triggered the plugin what is the context what is the business unit guid, input parameter, depth, mode etc.

Q. What is the difference between Plugin Context and Pre-Image?

Ans: Let say. I have a plugin registered on Update of Contact Entity, If I update only First-name and Last-name of contact record then plugin code can get only First name and Last name field's value from the Plugin Context along with the information related to the execution pipeline. But If I want to get the other field's value like email address and account name from plugin context, we will not be able to get the same and will get the error 'The given key was not present in the dictionary' error. To get these values, either we will have to perform retrieve query or can achieve it through pre-images. So Images are the best ways to get the copy of data (from whatever fields you want) before and after changes made to the database or changes committed to the database. While from context we can get the updated field's values only.

Q. How can you get the plugin tracing information in CRM?

Ans: ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService));

once we enable the ITracingService settings-> administer-> System setting  ->customization

then Enable logging to plug-in trace log.


Q. What is the difference between sales enterprise and sale professional ?
Ans:

Q. Which version you have used in visual studio?
Ans:

Q.  Explain about SSRS report?

Q.  Explain about powerApps?

Q.  How we will restrict data from some user in power apps(by using security role)?

Q. CRM get response from a third party application and it take 5 minute, How to handle?

Q.  There are three fields X,Y and Z. Z is updated by a third party application. when C is updated then sum of A and B in C. How to achieve this?

Q.  How many catch block can be used in try block?

Q.  Difference between workflow and plugin. when we go with custom workflow give the scenario?

Q.  How to pass parameter in plugin?

Q.  Explain about service bus?

Q.  After dev completion how you will deploy in production environment?

Q.  We have two dropdown fields on form   Dropdown1 having values like Mr ,Ms,  Dropdown2 having values like Male, Female. If you select 1st field as Mr then you need to auto populate the 2nd field as Male How you will achieve this?If the 1st field is auto populated with plugin API then how you will set the 2nd field value and what is the triggering point to set 2nd field value?

Q.  Can we restrict admin to access from certain information on form?

Q.  How can I restrict admin from entity information?

Q.  What will happen to the source solution after patch or cloning?

Q.  Which scenario cover pre-validation ? and when we shell use it? (please drill down more this)?

Q.  What is clone to patch?

Q.  Explain solution cloning?

Q.  What all new feature introduce in dynamic 365 for developer ?

Q.  How many module have you worked in CRM?

Q.  Do you know Azure components?

Q.  What is impersonation in plugin?

Q.  Can a workflow fire and restrict record creation during data import?

Q.  Explain about workflow and plugin ? Give an example where you used pre-validation plugin?

Q.  Have you worked on ribbon customization? On click of button in the ribbon an entity record should get created, How do you implement this scenario?

Q.  How many types of table in dynamic crm?

Ans:

Note: I will give all the answer keep Patience and stay tune with me for answer. 

           





















                         

Comments

  1. Nice blog buddy please keep up good work

    ReplyDelete
  2. If we go top to bottom u will fell better

    ReplyDelete
  3. Good work 👍🏻👍🏻..
    It will help us a lot

    ReplyDelete
  4. Keep good work Arshad Warsi,👌👌👌👌👌👌👌

    ReplyDelete
  5. This blog is good for who want to learn new things in Microsoft dynamics CRM

    ReplyDelete
  6. Nice blog buddy please keep up good work 👍👍👍👍👍

    ReplyDelete
  7. Please provide the answers as well so that we can easily grape the question..

    ReplyDelete
  8. It is good for fresher who all are searching job for 2 or 2+ years of experience. Thanks a lot for sharing such a nice blog buddy

    ReplyDelete
  9. Good work 👍🏻👍🏻..
    It will help us a lot.It is good for fresher who all are searching job ...

    ReplyDelete
  10. Amazing, keep up the good work Mate!

    ReplyDelete

Post a Comment

Popular posts from this blog

difference between enable rule vs display rule in ribbon workbench

If i create one record that created record date is older than 3 days, then I want to perform some operation with the help of business rule.