latest dynamics 365 interview questions for more than 2 years of experience
Q. Can we change the associate view as a default view if no, how can we make associate view as a default view.
Q. What is the difference between standard entity and activity entity?
Q. what is the scope of the entity?
Q. Once we create the entity what all option can't change ?
Q. What is the behaviour ?
Q. I have one power automate Let's called A on create and I have another power automate Let's called B on update. I want to trigger power automate b from power automate A?
Q. What will be happened in backend when we share the record ?
Q. How to implement record level security in CRM?
Q. Write JavaScript to fetch entity B record based on entity A column using fetch xml?
Q. What will happened in back end once you share record?
Q. Once the opportunity created how will create quote?
Q. Once quote create what will do next?
Q. Once we send the quotation to the customer. after that customer say add few more product and delete some of existing product. how will you do that?
Q. How to change the currency symbol ?
Q. Let's assume I have enable auditing for entity A but i am unable to see anything in audit history?
Q. How to import the data in CRM and tool name in xrmtoolbox?
Q. How to import the existing update data or creating new data in CRM?
Q. Can we add connection reference or connection to the solution?
Q. What all parameter we need to pass in retrieve Multiple, update, create, delete?
Q. Can we add the line item in lead ?
Q. Can we add the product in lead ?
Q. How to restrict the creation of account and contact while lead is qualify ?
Q. What is Product Catalogue in CRM ?
Q. What will be happened in background when product added or deleted from quotation (In sales module) ?
Q. How will we send the quotation(In sales module) to the customer in CRM?
Q. While importing the solution in higher environment what all option come for upgrade?
Ans:
Stage for Upgrade:
Description: Stages the solution for upgrade, allowing you to prepare for a future upgrade. This can be useful for large or complex solutions.
Example: You import a new version of a solution but want to test it before fully applying it. This option lets you have both the old and new versions in the system temporarily.
Upgrade:
Description: Updates the components and removes any components that were deleted from the solution. It ensures that the target environment matches the source environment exactly.
Example: If the new solution version no longer includes certain entities or fields, those will be removed from the target environment to match the source environment.
Q. What could be the reasons user are having create privilege but not able to create the record in CRM?
Ans:
Insufficient Privileges on Related Entities:
Example: If the user is trying to create a contact and the contact needs to be associated with an account, the user must have the necessary privileges on the account entity like append to privilege on account and append privilege on contact.
Security Role Scope:
Example: The user’s security role might have the create privilege set to a limited scope, such as “User” or “Business Unit” instead of “Organization”.
Field-Level Security
Example: Certain fields might have field-level security enabled, and the user might not have the necessary permissions to interact with those fields.
Business Rules and Plugins
Example: There might be business rules or plugins that enforce additional rules or validations, preventing the creation of the record if certain conditions are not met.
Q. Once we filter the entity with the help of query Expression and fetch xml again we need to filter it how can we do that in plugin CRM?
Ans: Use LINQ filter for again filter the result .
Q. What is LINQ and LAMDA in C#?
Ans: LINQ (Language Integrated Query)
LINQ is a powerful feature in C# that allows you to query collections of data in a concise and readable manner.
LINQ can be used with various data sources, including arrays, collections, XML, and databases.
Lambda Expressions:
Lambda expressions are anonymous functions that you can use to create delegates or expression tree types.
They are a concise way to represent small function expressions and are often used in LINQ queries.
Q. What is static and non static in c#?
Q. Up to what level we can fetch column in dynamic CRM?
Ans: Parent child up to that we can fetch column.
Q. What is interface in C#.
Q. How to fetch the data from CRM in portal using code?
Ans: Web Templet (Code) > Page Templet > Web page.
Note : While creating the web templet you need to specify the MIME TYPE like Json.
Example : Code need to put under web templet
{% fetch ampData %}
write your fetch xml here.
{% endfetchxml %}
{
"totalcount": { { ampData.results.total_record_count } },
"morerecords": { { ampData.results.more_records } },
"page": { { request.params['page'] | defult: 0 } },
"results": [
{%for item in apmData.results.entities %}
{
"CaseNo": "{{item.ticketnumber}}",
"CaseNo": "{{item.ticketnumber}}",
"Status": "{{item.statuscode.label}}", label for optionset value
"Type": "{{item.activitytypecode}}",
"Customerid": "{{item.customerid.name}}", name lookup
}
{% unless forloop.last %}, {% endless %}
{% endfor %}
]
}
Q. How to get the language code of the login user in portal?
Ans : {{website.selected_language.code}}
Q. How to hide the field on the portal form using code?
Ans :
$('schema_name').hide()
$('schema_name_lable').hide()
$('schema_name_lable').show()
Q. How to get and set Value in portal using code?
Ans: Get the value
<script>
$(document).ready(function(){
$("#schemaNameOfField").val()
});
</script>
Set the value
<script>
$(document).ready(function(){
$("#schemaNameOfField").val("vlauetobeset")
});
</script>
Q. How to get lookup field value and text field value in portal using code?
Ans:
Example : User lookup value :
<div>
{{user.parentcustomerid.name}}
</div>
Account text value :
<div>
{{user.name}}
</div>
Q. How to add form in portal using code?
Ans:
<div>
{% entityform name : 'formname'%}
</div>
Q. What is the scope of entity permission in portal?
Ans:
Global(Any one access)
Contact(Login user)
Self(Login user)
Account()
Parent()
Q. What is the entity permission in portal?
Ans: Table permission similarly work security role in dynamic CRM. Only one difference is here dynamic security role for internal user but entity permission apply for portal user(Contact). For every entity permission we need to add web role.
Q. What is web role in portal?
Ans: Web role is similar like CRM security role.
Q. How many type of mode available for entity Form in Portal?
Ans: Three (Insert for creating , Edit for updating , Read Only for viewing prepose).
Q. How to clear the cache in portal?
Ans: portalURL/_services/about
Q. What are perquisite for making ajax web API call?
Q. How a contact user login portal without any web role?
Ans: As soon as any user register in portal Implicitly system assign a web role as authenticated user to the user that is why user is able to login in portal.
Q. How will we be identify whether contact is created from portal or CRM?
Ans: If contact has created from Portal then contact must have data present in two field one is "Password Hash" and "User Name" otherwise contact record has created from CRM.
Q. Who can restart the portal?
Ans: Admin of CRM.
Q. Is that portal user is nothing more than a contact in CRM?
Ans: Yes
Q. How to configure the portal?
Ans: Dynamic 365 Admin > Environment > Application > Portal Add-On > Configure > Put all the information and audience as per requirement.
Q. What is web role and benefit of it ?
Q. What is table permission in portal ?
Q. What is email routing in CRM?
Q. What QueryByAttribut and QueryExpression in CRM?
Ans: QueryByAttribute and QueryExpression are used for fetching data.
QueryByAttribut is use for simple query but QueryExpression is use for complex query.
Q. What is security profile in CRM?
Ans: A security profile is a set of permissions that control access to specific data fields within the system.
Here are some key points about security profiles in CRM:
Field-Level Security: Security profiles are used to manage field-level security, which means controlling access to individual fields within an entity. For example, you might restrict access to a customer’s mobile phone number to only certain roles within your organization.
Permissions: Security profiles can grant different levels of permissions, such as:
Read: Users can view the data in the field.
Create: Users can add data to the field when creating a record.
Update: Users can modify the data in the field after it has been created.
User and Team Assignment: Security profiles can be assigned to individual users or teams, allowing for flexible and granular control over who can access specific data.
System Administrator Role: By default, users with the System Administrator role have full access to all secured fields. This role cannot be modified or deleted.
Q. What is Service Module in CRM?
Ans:
Plugin:
Q. What happen when we try to fetch the field (field level security) data through plugin but user don't have privilege to see the data?
Ans: Null value is returned. Plugin will receive a null value for the secure field, even if the field has a value in the databased.
Q. What is executeMutiple in plugin?
Ans: The ExecuteMultiple request in plugins is used to execute multiple operations in a single request, which can improve performance.
any failure in the synchronous step must roll back all data operations to maintain data integrity.
Q).Difference between pre operation, pre validation and post operation?
Ans:
In dynamics CRM plugins, the Pre-Validation and Pre-Operation stages are both pre-event stages, but they serve different purposes and occur at different points in the execution pipeline.
Pre-Validation Stage
- Execution Timing: This stage executes **before** the main system operation and outside the database transaction.
- Purpose: It is used for custom validation or to update the entity’s data before the system performs its own validation.
- Rollback: Since it is outside the database transaction, any errors here will not cause a rollback of the entire transaction.
- Security Checks: This stage occurs before any security checks are performed to verify that the calling or logged-on user has the correct permissions.
- Use Case: Ideal for scenarios where you need to validate data or perform checks that should not affect the database transaction. For example, checking for duplicate records before creation.
Pre-Operation Stage
- Execution Timing: This stage executes before the main operation (create, update, delete, etc.) but inside the database transaction.
- Purpose: It is used to modify the entity’s data before the main operation is performed.
- Rollback: Since it is inside the database transaction, any errors here will cause a rollback of the entire transaction.
- Security Checks: This stage involves security checks to verify that the calling user has the correct permissions to perform the intended operation.
- Use Case: Ideal for scenarios where you need to make changes to the entity’s data that should be part of the transaction. For example, updating related records or setting default values.
Post-Operation Stage
Execution Timing: Executes after the main operation and inside the database transaction.
Purpose: Used for operations that need to occur after the main operation has completed, such as updating related records or triggering workflows.
Rollback: Errors here cause a rollback of the entire transaction.
Security Checks: Security checks have already been performed.
Use Case: Ideal for actions that depend on the main operation being completed, such as sending notifications or updating related entities.
Key Differences
Transaction Scope:
Pre-Validation is outside the transaction.
Pre-Operation and Post-Operation are inside the transaction.
Error Handling:
Errors in Pre-Validation do not cause a rollback.
Errors in Pre-Operation and Post-Operation cause a rollback.
Security Checks:
Pre-Validation occurs before security checks.
Pre-Operation and Post-Operation occur after security checks.
Example Scenarios
- Pre-Validation: Checking for duplicate records or validating data formats before the main operation.
- Pre-Operation: Modifying entity attributes or updating related records as part of the transaction.
- Post-Operation: Sending notifications or updating related entities after the main operation is completed.
Q) Can we pass information from one plugin to other plugin in dynamic CRM?
Yes, you can pass information between plugins in dynamics CRM using Shared Variables. Shared Variables allow you to share data between plugins registered on both pre(Pre-validation, Pre-Operation) and post(Post Operation) events within the same execution context.
How to Use Shared Variables
1. Set Shared Variables in the Pre-Event Plugin:
- In your pre-event plugin, you can set values in the "SharedVariables" collection of the "IPluginExecutionContext".
2. Retrieve Shared Variables in the Post-Event Plugin:
- In your post-event plugin, you can retrieve these values from the "SharedVariables" collection.
Example Code
Pre-Event Plugin
csharp code
public class PreEventPlugin : IPlugin
{
public void Execute(IServiceProvider serviceProvider)
{
IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity entity)
{
// Set a shared variable
context.SharedVariables["MySharedVariable"] = "SomeValue";
}
}
}
Post-Event Plugin
csharp
public class PostEventPlugin : IPlugin
{
public void Execute(IServiceProvider serviceProvider)
{
IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
if (context.SharedVariables.Contains("MySharedVariable"))
{
// Retrieve the shared variable
string sharedValue = (string)context.SharedVariables["MySharedVariable"];
// Use the shared value as needed
}
}
}
Key Points
- Scope: Shared Variables are only available within the same execution context. They cannot be used to share data between plugins registered on different messages or entities.
- Usage: This method is useful for passing data during complex plugin operations, avoiding unnecessary calls to the organization service or creating custom attributes.
Q. What is the interface name required for custom workflow?
`Ans: CodeActivity
Q. How to bulk insert records without using service.create and using custom code?
Ans: CreateMutiple
Q. How to get more that 5000 records from CRM?
Ans:
Step-by-Step Guide
Initialize Variables:
Create variables for PageNumber (start with 1) and PagingCookie (initially empty).
Create QueryExpression:
Define your QueryExpression to fetch the desired records.
Retrieve Records in a Loop:
Use a loop to retrieve records in batches, updating the PagingCookie and PageNumber with each iteration.
Code Using QueryExpression:
public List<Entity> RetrieveAllRecords(IOrganizationService service, QueryExpression query)
{
var pageNumber = 1;
var pagingCookie = string.Empty;
var result = new List<Entity>();
EntityCollection resp;
do
{
if (pageNumber != 1)
{
query.PageInfo.PageNumber = pageNumber;
query.PageInfo.PagingCookie = pagingCookie;
}
resp = service.RetrieveMultiple(query);
if (resp.MoreRecords)
{
pageNumber++;
pagingCookie = resp.PagingCookie;
}
result.AddRange(resp.Entities);
} while (resp.MoreRecords);
return result;
}
Q. Difference between XMLHTTP and Xrm.WebApi .
Ans: XMLHTTP: Can be synchronous or asynchronous. By default, it is asynchronous, but you can make it synchronous by setting the third parameter of the open method to false.
JavaScript Example:
var req = new XMLHttpRequest();
req.open("GET", "/api/data/v9.0/accounts", false); // false makes it synchronous
req.send();
if (req.status === 200) {
console.log(req.responseText);
}
Xrm.WebApi: Always asynchronous. They return a promise, which means you handle the result using .then() for success and .catch() for errors.
JavaScript Example:
Xrm.WebApi.retrieveMultipleRecords("account", "?$select=name").then(
function success(result) {
console.log(result.entities);
},
function (error) {
console.error(error.message);
}
);
Q. Why do we use DevOps in dynamic CRM?
Ans:
(a) Merge solution in CRM.
(b) Reduce manual error.
(c) Automate deployments across environment.
(d) Set up CI/CD pipelines in different environment.
Q. To execute five records at a time out of 100 records in Power Automate for dynamics CRM?
Ans: List Records: Use the "List Records" action in the Common Data Service (CDS) connector to retrieve all 100 records from your entity.
Initialize Variables: Create two variables, one for the total count of records and another to keep track of the current batch.
Apply to Each: Use an "Apply to Each" loop to iterate through the records. Inside this loop, you can use a condition to check if the current record index is within the range of the current batch (e.g., 1-5, 6-10, etc.).
Process Records: Add your actions to process the records within the loop.
Increment Batch: After processing each batch of five records, increment the batch counter and update the range for the next set of records.
Q. How can we change dynamic connection to service principal account connection?
Ans: Any connection to dynamic change to service principal. any connection other than dynamic we don't use service principal. Service principal work only for dynamic as a connector. Your all CDS connector change to service principal.
Using a Power Platform service principal account is an awesome way to securely run your Power Automate flows. Service principals have system the administrator role and stay logged permanently stay logged in with a special type of permanent password called a client secret. No user can log into the service principal account which makes connecting them with Power Automate much safer than a shared admin account with a user name or password.
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:
EntityReference is a type used to reference another entity. It is commonly used in plugins to link records together. An EntityReference contains three key pieces of information:
Logical Name: The name of the entity being referenced.
ID (GUID): The unique identifier of the specific record.
Name: The name of the record (optional).
Entity entity = (Entity)context.InputParameters["Target"];
if (entity.LogicalName == "new_producttaxrate")
{
if (entity.Attributes.Contains("new_product"))
{
EntityReference productReference = (EntityReference)entity.Attributes["new_product"];
Guid productId = productReference.Id;
string productName = productReference.Name;
}
}
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?
Ans:
Q. How to send the birthday mail to the user in dynamic CRM?
Ans: Solution
Q. What type of join you can see in fetch xml?
Ans: In FetchXML, you can use two main types of joins:
Inner Join: This join includes only the records that have matching values in both entities. It’s the default join type in FetchXML.
Outer Join: This join includes all records from the first entity, even if there are no matching records in the second entity
These joins are specified using the link-type attribute in the link-entity element of your FetchXML query.
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">
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:
Debugging an Azure Function using Postman involves a few key steps. Here’s a guide to help you through the process:
Set Up Your Azure Function:
- Ensure your Azure Function is deployed and running. If you’re testing locally, make sure your local function runtime is active.
Get the Function URL:
- In the Azure Portal, navigate to your function app and select the specific function you want to test. Click on “Get Function URL” to copy the URL.
Configure Postman:
- Open Postman and create a new request.
- Set the request type to
POST
(orGET
, depending on your function’s trigger). - Paste the function URL into the request URL field.
Add Headers:
- If your function requires an API key, add it to the headers. Typically, this is done by adding a header with the key
x-functions-key
and the value being your function’s API key.
- If your function requires an API key, add it to the headers. Typically, this is done by adding a header with the key
Set Up the Request Body:
- If your function expects a JSON payload, select the
Body
tab in Postman, chooseraw
, and set the format toJSON
. - Enter the JSON data that your function expects.
- If your function expects a JSON payload, select the
Send the Request:
- Click the
Send
button in Postman to send the request to your Azure Function.
- Click the
Check the Response:
- Review the response from your function in the Postman interface. This will help you understand if the function executed correctly or if there were any errors.
Debugging:
- If you encounter errors, you can use the logs in the Azure Portal to get more details. Navigate to your function app, select the function, and then go to the
Monitor
tab to view logs. - You can also attach a debugger in Visual Studio if you’re running the function locally
- If you encounter errors, you can use the logs in the Azure Portal to get more details. Navigate to your function app, select the function, and then go to the
Here’s a simple example of how your Postman setup might look:
- URL:
http://<APP_NAME>.azurewebsites.net/api/<FUNCTION_NAME>
- Headers:
x-functions-key: <YOUR_FUNCTION_KEY> Content-Type: application/json
- Body:
{ "param1": "value1", "param2": "value2" }
If you follow these steps, you should be able to debug your Azure Function effectively using Postman.
Q. How many ways to debug a plugin in CRM?
Ans:
Debugging a plugin in CRM, especially in dynamics 365, can be done in several ways. Here are some common methods:
Using the Plugin Profiler:
- Install the Plugin Profiler: Use the Plugin Registration Tool to install the profiler.
- Capture a Profile: Execute the plugin and capture its profile.
- Replay the Profile: Use Visual Studio to replay the profile and debug the plugin code
Using Trace Logs:
- Enable Plugin Trace Logs: Ensure that trace logging is enabled in your CRM environment.
- Log Errors: Use the
ITracingService
interface to log errors and messages within your plugin code
Persist to Entity:
- Save Profiles: Save the profiles from the plugin profiler table.
- Debug in Visual Studio: Attach Visual Studio to the Plugin Registration Tool and use the saved profiles to debug
Remote Debugging:
- Deploy the Plugin On-Disk: Copy your plugin DLL to the CRM server.
- Configure Remote Debugger: Set up and configure the Visual Studio Remote Debugger.
- Attach to Process: Attach Visual Studio to the remote process and debug
Using Exception Handling:
- Catch Exceptions: Implement try-catch blocks in your plugin code to handle and log exceptions.
- Review Logs: Check the CRM logs for any captured exceptions and debug accordingly
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 1 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: To fetch the records for 10 accounts, each having 5 contacts, you would need to make two service calls:
1. One call to fetch the 10 accounts
2. One call to fetch the 50 contacts (5 contacts per account x 10 accounts).
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?
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:
If you try to import the same solution (A) as a managed solution into an environment (UAT) where it already exists as an unmanaged solution, you will encounter issues. Here’s what happens:
1. Conflict and Import Failure: The system will not allow you to import the managed solution because it conflicts with the existing unmanaged solution. Managed and unmanaged solutions cannot coexist in the same environment.
2. Dependency Issues: If there are dependencies created by the unmanaged solution, these will prevent the managed solution from being imported. You would need to remove these dependencies first.
3. Data Loss Risk: If you delete the unmanaged solution to import the managed one, you risk losing data associated with custom entities and attributes that are part of the solution.
To successfully convert the unmanaged solution to a managed one, you can follow these steps:
1. Export the Unmanaged Solution: Export the unmanaged solution from the UAT environment.
2. Delete the Unmanaged Solution: Remove the unmanaged solution from the UAT environment.
3. Import as Managed: Import the solution back into the UAT environment as a managed solution.
This process ensures that the managed solution is correctly imported without conflicts. If you need to retain data, make sure to back it up before deleting the unmanaged solution.
Q. There is one filed which is deleted in Dev but I want to delete from UAT as well how to do that?
Ans: To delete a field from UAT after it has been deleted in Dev, you can follow these general steps:
1. Export the Solution from Dev:
- In your Dev environment, export the solution that contains the field you deleted. Make sure to export it as a managed solution.
2. Import the Solution to UAT:
- Go to your UAT environment and import the managed solution you exported from Dev. This should remove the field from UAT as well.
3. Verify the Deletion:
- After importing the solution, verify that the field has been deleted from UAT.
Q. How to move the document template from one instance to another instance in CRM?
Ans: To move a document template from one instance to another in CRM, you can use the XRMToolBox with the Document Templates Mover plugin. Here are the steps:
1. Connect to XRMToolBox**: Open XRMToolBox and connect it to your source environment.
2. Select the Tool: Choose the "Document Templates Mover" tool.
3. Load Templates: Click on "Load Templates" to display all available templates.
4. Select the Template: Choose the template you want to transfer.
5. Select Target: Click on "Select target" to choose the destination environment.
6. Transfer Template: Click on "Transfer template(s)" to move the document template to the target environment.
Q. Are you able to get the related entity data from email template?
Ans: Yes
Q. How to take master data from dev to production?
Ans: Transferring master data from a development environment to a production environment involves several key steps to ensure data integrity and consistency. Here's a general approach you can follow:
1. Data Preparation:
- Clean and Validate Data: Ensure the data is accurate and free from errors.
- Backup Data: Always create a backup of your current production data before making any changes.
2. Data Export:
- Export Data from Development: Use tools or scripts to export the master data from your development environment. This could be done using SQL scripts, data export tools, or specific commands depending on your database system.
3. Data Transformation:
- Format Data: Ensure the exported data is in a format compatible with the production environment.
- Map Data Fields: Verify that the data fields in the development environment match those in the production environment.
4. Data Import:
- Import Data to Production: Use import tools or scripts to load the data into the production environment. Ensure that the import process is tested in a staging environment first to catch any potential issues.
5. Validation and Testing:
- Verify Data Integrity: Check that the data has been imported correctly and is consistent with the original data.
- Run Tests: Perform tests to ensure that the new data does not cause any issues in the production environment.
6. Monitoring:
- Monitor System Performance: Keep an eye on the system to ensure that the new data does not negatively impact performance.
- Address Issues Promptly: Be prepared to address any issues that arise during or after the data transfer.
For specific tools and commands, the exact steps can vary depending on the database and systems you are using. For example, in SAP environments, you might use ALE data transfer methods.
Q. What all the solution Component in CRM?
Ans: Lead Management, Customer Service, Business Report, Marketing Automation etc.
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: Yes
Explain:
When you register a plugin on the pre-validation stage in a system like dynamics 365, it means the plugin will execute before the main operation (like creating a task or sending an email) is validated. Here's what typically happens:
1. Pre-Validation Execution: The plugin runs before the main operation is validated. This is useful for checking conditions or modifying data before the operation proceeds.
2. Task Creation and Email Sending: Your code will attempt to create a task and send an email during this stage.
3. Error Handling: If an error occurs during the execution of your plugin, the entire operation will be rolled back. This means:
- The task creation will not be completed.
- The email will not be sent.
- Any changes made by the plugin will be undone.
This rollback mechanism ensures data integrity and consistency, preventing partial or incomplete operations from being committed to the system.
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: Caller ID refers to the identifier of the user who initiates a plugin operation. This is particularly useful in scenarios where actions need to be performed on behalf of a specific user.
Q. How to capture error in power automate?
Ans: Try, Catch, Finally.
Q. Explain the Human Resource Model?
Ans:
Q. Can we register the Logic Apps on event based?
Ans: Yes, you can register Azure Logic Apps to be event-based. This means you can trigger workflows in Logic Apps based on specific events. Here are a few ways to do this:
1. Azure Event Hubs: You can connect your Logic App to Azure Event Hubs to monitor and manage events. This involves creating an Event Hubs trigger in your Logic App workflow.
2. Azure Event Grid: You can use Event Grid to trigger Logic Apps when certain events occur. This is useful for scenarios like responding to changes in Azure resources.
3. Azure Blob Storage: If you want your Logic App to trigger when a blob is added or modified in Azure Blob Storage, you can use the "When a blob is added or modified" trigger.
4. Custom Events: You can also create custom events and use HTTP triggers to start your Logic App workflows based on these events.
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: To change an OData call from synchronous to asynchronous in dynamics CRM, you can use the Xrm.WebApi methods which are inherently asynchronous. Here’s a basic example using JavaScript with the async and await keywords to ensure the calls are handled asynchronously.
Q. What is the advantage of registering the plugin on pre-operation?
Ans:
Registering a plugin on the pre-operation stage in dynamics 365 has several advantages:
1. Data Integrity: Since the plugin executes within the database transaction, it ensures that any changes made by the plugin are part of the same transaction as the main operation. This means if the main operation fails, the changes made by the plugin will also be rolled back, maintaining data integrity.
2. Modification Before Commit: You can modify the data before it is committed to the database. This is useful for scenarios where you need to enforce business rules or update certain fields based on specific conditions.
3. Performance: Pre-operation plugins run synchronously and within the same transaction as the main operation, which can be more efficient compared to post-operation plugins that might require additional processing after the main operation.
4. Validation: It allows for additional validation before the data is saved. This can help in preventing invalid data from being committed to the database.
Q. What is the difference between primary id or primary field of the entity in CRM?
Ans:- In summary, the primary ID is used internally by the system to uniquely identify records, while the primary field is used to display a meaningful name or description to users.
1. Primary ID (Primary Key):
- This is a unique identifier for each record in an entity.
- It is typically a Globally Unique Identifier (GUID) that ensures each record can be uniquely identified within the CRM system.
- For example, in an "Account" entity, the primary ID might be 'accountid'.
2. Primary Field:
- This is the main attribute used to identify a record in a user-friendly way.
- It is often a text field that contains a name or description of the record.
- For example, in an "Account" entity, the primary field might be 'name'.
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: Dynamics 365 — Call Power Automate Flow from JavaScript | by Furkan Karacan | Medium
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 centre 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: In this scenario, you can use a feature called Case Teams or Case Collaboration in many CRM systems like Salesforce. This allows multiple users to work on the same case without needing to transfer ownership or share records directly. Here’s how you can do it:
1. Case Teams: If your CRM supports Case Teams, you can add yourself to the case team for the account. This way, you can collaborate on the case without needing ownership or direct access to the account record.
2. Case Collaboration: Some systems allow for case collaboration where you can be added as a collaborator on a case. This gives you the necessary permissions to create and manage cases related to that account.
3. Automated Case Creation: If your CRM has automation capabilities, you can set up a process where cases are automatically created and assigned based on certain criteria. This way, you can ensure that cases are created even if the primary owner is unavailable.
4. Temporary Access: If none of the above options are available, you might need to request temporary access from your system administrator. Explain the situation and the necessity for access to ensure customer issues are resolved promptly.
Q. What is recurring workflow in DCRM with example?
Ans: Setting Up Recurring Workflows in Dynamics CRM 2016 | HCLTech
Q. Which one is suitable Business Rule and JavaScript to lock the 100 field in DCRM ?
Ans: JavaScript
Q. What is the difference between rest API and soap API?
Ans: SOAP provides strict standards and security, while REST offers flexibility and simplicity.
SOAP:
Typically used for complex applications requiring greater security and transaction management.
Usually based on XML.
REST:
Suited for simple CRUD-style applications.
Can be based on either XML or JSON.
Q. Take the real-time scenarios to explain the plugin pipeline in CRM?
Ans: Plugin Pipeline Stages
1. Pre-Validation (Stage 10)
- Scenario: Imagine you have a CRM system where users can create customer records. Before the record is saved, you want to ensure that the email address is not already in use.
- Action: A plugin registered in the Pre-Validation stage checks the email address against existing records. If a duplicate is found, the plugin throws an error, preventing the record from being created.
2. Pre-Operation (Stage 20)
- Scenario: Suppose you need to calculate a discount based on the total order amount before the order is finalized.
- Action: A plugin in the Pre-Operation stage calculates the discount and updates the order record with the discount amount. This happens within the database transaction, ensuring that if any subsequent operations fail, the discount calculation is rolled back.
3. Post-Operation (Stage 40)
- Scenario: After an order is successfully created, you want to send a confirmation email to the customer.
- Action: A plugin in the Post-Operation stage sends the email. This stage can be synchronous (immediate) or asynchronous (queued for later). If the mail sending fails, it does not affect the order creation.
### Real-Time Example
Let's consider a real-time example of a sales process in a CRM system:
1. Pre-Validation: A sales representative enters a new lead into the CRM. The Pre-Validation plugin checks if the lead's email address already exists in the system. If it does, an error message is displayed, and the lead is not saved.
2. Pre-Operation: The sales representative updates the lead's information with potential deal details. The Pre-Operation plugin calculates the potential revenue based on the deal size and updates the lead record. This ensures that the calculation is part of the transaction and will be rolled back if the lead creation fails.
3. Post-Operation: Once the lead is successfully created, a Post-Operation plugin sends a welcome email to the lead. This plugin runs asynchronously, ensuring that the email sending process does not delay the lead creation.
These stages ensure that data integrity is maintained, and necessary actions are performed at the right time during the record's lifecycle.
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:
Above example:
- Replace `"child_entity_logical_name"` with the logical name of your child entity.
- Replace `"child_entity_id"` with the primary key of your child entity.
- Replace `"parent_entity_id"` with the field in the child entity that references the parent entity.
This plugin will delete all child records associated with the parent entity when the parent entity is deleted.
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 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: SUM, COUNT, MIN, MAX 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.
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.
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 that store in MS dynamic without storing it in dynamic CRM database and Data is fetched and displayed in real-time whenever a user accesses the virtual entity.
Important Point:
Real-time Data Access: Data is retrieved from the external source at runtime.
No Data Duplication: Since the data isn’t stored in the CRM database, it helps avoid duplication.
Seamless Integration: Users interact with virtual entities just like any other entity in CRM, making the experience seamless.
Example Scenario:
Imagine you have a CRM system for a retail company, and you want to display inventory data from an external warehouse management system. Instead of importing and storing this data in your CRM, you can create a virtual entity that connects to the warehouse system. When a user views the virtual entity in CRM, they see the latest inventory data directly from the warehouse system, without any data being stored in the CRM database.
Limitation:
Virtual entities in dynamics 365 CRM offer a powerful way to integrate external data, but they do come with some limitations:
Read-Only Data: Virtual entities are read-only, meaning you cannot push changes made in dynamics 365 back to the external data source.
Organization-Owned Only: Only organization-owned entities are supported. User-owned entities are not supported.
No Auditing or Change Tracking: Virtual entities do not support auditing or change tracking.
No Business Process Flows: Business process flows cannot be used with virtual entities.
No Offline Support: Offline caching of values is not supported for virtual entities.
Modelling Requirement: The external data must be possible to model as a dynamics 365 entity.
Virtual entity creation:
Set Up the Data Source:
Navigate to Settings > Administration > Virtual Entity Data Sources.
Create a new data source by selecting the appropriate data provider (e.g., OData v4 Data Provider).
Enter the name and URL of the external data source, then save.
Create the Virtual Entity:
Go to Settings > Customizations > Customize the System.
In the solution explorer, create a new entity by selecting Entities in the left navigation pane, then click New.
On the General tab of the Entity Definition, check the Virtual Entity option.
In the Data Source drop-down list, select the data source you created earlier.
Fill in the required fields, such as the entity name, display name, and external name.
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:
In dynamics 365 CRM, business rules can be executed on both the server side and the client side, depending on the scope you set. Here's a breakdown of when and how they are called:
Server Side
- Scope: Entity
- Execution: Runs on the server side, meaning it gets queued up with workflows, plug-ins, etc.
- Example: If you set a business rule to run at the entity level, it will apply to all forms and will be executed on the server. For instance, you might have a rule that sets a field value based on certain conditions whenever a record is created or updated, regardless of which form is used.
Client Side
Scope: All Forms or Specific Form
- Execution: Runs on the client side, meaning it executes when the user interacts with the form.
- Example: If you set a business rule to run on a specific form, it will only execute when that form is opened. For example, you might have a rule that shows or hides fields based on the value of another field when a user is filling out a form.
Example Scenario
Let's say you have a business rule that sets the "Discount" field to 10% if the "Order Amount" is greater than $1000.
- Server Side: You set the scope to "Entity". This rule will apply to all forms and will be executed on the server whenever the record is created or updated.
- Client Side: You set the scope to "All Forms". This rule will execute on the client side whenever any form is opened and the "Order Amount" field is changed.
Example:
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.
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("Walking..."); }
}
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:
Workflows
Purpose: Automate repetitive tasks and processes.
Triggers: Can be triggered by events such as record creation, update, deletion, or on-demand.
Execution: Can run in the background (asynchronous) or in real-time (synchronous).
Customization: Configurable through a user-friendly interface without the need for coding.
Scope: Can be limited to specific organizational scopes (e.g., organization, business unit, user).
Use Cases: Ideal for tasks like sending emails, updating records, and creating tasks based on specific conditions.
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.
Actions
Purpose: Extend the functionality of workflows and plugins by defining custom operations.
Triggers: Typically invoked through code, plugins, or workflows.
Execution: Can be called synchronously or asynchronously, depending on how they are invoked.
Customization: Requires some coding knowledge to define custom logic and operations.
Scope: Can be used across different entities and processes, providing more flexibility.
Use Cases: Suitable for complex business logic that needs to be reused across multiple processes.
Key Differences
Complexity: Workflows are easier to set up and manage, while Actions offer more flexibility and require coding.
Triggers: Workflows can be triggered by various events, whereas Actions are usually called programmatically.
Usage: Workflows are best for straightforward automation tasks, while Actions are used for more complex, reusable business logic.
Q. When should you use custom workflow over plugin?
Custom Workflows: Best for user-friendly, asynchronous, long-running, and visually represented processes.
Plugins: Best for immediate response, complex logic, data validation, and transactional support.
Custom Workflows:
User-Friendly Configuration: Custom workflows can be configured through the CRM interface, making them accessible to non-developers. This is ideal for processes that need to be managed or modified by business users.
Asynchronous Processing: If the task can be processed in the background without immediate feedback, custom workflows are a good choice. They run asynchronously by default, which can help with performance.
Long-Running Processes: Workflows are better suited for processes that take a long time to complete, as they can be paused and resumed.
Visual Representation: Workflows provide a visual representation of the process, which can be easier to understand and manage.
Reusability: Custom workflow activities can be reused across multiple workflows, providing flexibility and reducing redundancy.
When to Use Plugins
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.
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?
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;
}
Now add the new step in enable rule and select the custom rule.
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: personal, system, 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?
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.
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 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));
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
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: 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.
Nice blog buddy please keep up good work
ReplyDeleteNice blog Arshad
ReplyDeleteIf we go top to bottom u will fell better
ReplyDeleteGood one Arshad!
ReplyDeleteKeep the good work up👍👍👍
ReplyDeleteGreat Arshad 👍 keep it up
ReplyDeleteGood work 👍🏻👍🏻..
ReplyDeleteIt will help us a lot
Keep good work Arshad Warsi,👌👌👌👌👌👌👌
ReplyDeleteThis blog is good for who want to learn new things in Microsoft dynamics CRM
ReplyDeleteNice blog buddy please keep up good work 👍👍👍👍👍
ReplyDeletePlease provide the answers as well so that we can easily grape the question..
ReplyDeleteIt 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
ReplyDeleteCongratulations my heartbeat
ReplyDeleteGood work 👍🏻👍🏻..
ReplyDeleteIt will help us a lot.It is good for fresher who all are searching job ...
Good work
ReplyDeleteAmazing, keep up the good work Mate!
ReplyDeleteAwesome work......
ReplyDeleteExcellent
ReplyDeleteIts very useful
ReplyDeleteAwesome
ReplyDeleteIt was very Useful....Thanks
ReplyDeleteExcellent Article.Thanks for sharing with us..
ReplyDeleteDevOps Training
DevOps Online Training
DevOps Training in Hyderabad
DevOps Training in Ameerpet
This Article is so Great! Thank you for sharing this Awesome Information.
ReplyDeleteDevOps Online Training in Hyderabad
DevOps Online Training institute
DevOps Training Online
DevOps Online Course
Excellent Blog!! It is very useful information for us.
ReplyDeleteDevOps Training institute in Ameerpet
DevOps Project Training
DevOps Training in Ameerpet
DevOps Training institute in Hyderabad
DevOps Course in Hyderabad
I'm glad you found the post helpful for your research! I'll be sure to share more information on the topic in the future.
ReplyDeleteBest Nodejs Training Institute In Hyderabd
I'm glad you found the post helpful for your research! I'll be sure to share more information on the topic in the future.
ReplyDeleteBest Nodejs Training Institute In Hyderabd
Such an informative post Thanks for sharing. We are providing the best services click on below links to visit our website.
ReplyDeletePower Apps and Power Automate Training
Microsoft Power Apps Online Training
Microsoft Power Apps Course
Power Apps Online Training
Power Apps Training
Power Apps Training Hyderabad
Power Apps Training Ameerpet
Microsoft Power Platform Online Training in Ameerpet
I'm glad you found the post helpful for your research! I'll be sure to share more information on the topic in the future.
ReplyDeleteBest Node jsTraining Institute In Hyderabad