Basic QA's

 1. Which One Will Execute First JavaScript or Business Rule as per the Execution order ?

Ans: JavaScript will run first the reason behind it Business rule will only work after it gets converted to JavaScript File ( which happens in background ). So basically , In between JavaScript and Business Rule , both gets processed only as JavaScript File. Eventually JavaScript doesn't require any conversion to JavaScript format.

Follow the YouTube Link : https://youtu.be/0hGWTJxTaD8?si=6Co4B-lDxaxJXA7z

2. Which one will Execute first Work Flow or plugin as per Steps and Rank?

Ans: Work flow and Plugin both runs in Synchronous(Realtime) and Asynchronous(Background).

By following Steps and Rank in Plugin and Work Flow, Synchronous plugin execution order or rank starts from "1" by default and Synchronous Work Flow (Real Time Work Flow) rank starts from "0" - Zero. So by default value the Synchronous Work Flow will execute first where as Synchronous plugin will execute next.

Plugin: 

A plugin can have multiple stages, each with their own rank. The rank is a positive integer that determines the order in which plugins are executed within the same step. The plugin with the lowest rank will be executed first, while the plugin with the highest rank will be executed last.

By default, plugin registration tool will set execution order to 1 when adding a new message processing step.

Work Flow: 

Workflows in Dynamics 365 do not have stages like plugins do. How ever workflows also have a concept of rank, just like plugins. The rank determines the order in which workflows are executed when multiple workflows are associated with the same entity. The workflow with the lowest rank is executed first, while the workflow with the highest rank is executed last.


The rank for the real-time workflows are 0 by default and the rank for the background workflows are INT.MAX by default.

  • Real-time workflows will run before synchronous plugins.
  • Synchronous plugins will run before asynchronous plugins.
  • Asynchronous plugins will run before background workflows.
Follow the link for more information : https://crmminds.com/2023/01/24/dynamics-365-plugin-vs-workflow-execution-order-which-runs-first/

3. Which one will Execute First among these JavaScript , Business Rule , Work Flow and Plugin?
Ans: JavaScript will execute First among all these and then Business Rule. Where as Work flow and Plugin both runs in Synchronous(Realtime) and Asynchronous(Background). 

So work flow and plugin follows by the below execution process.
  • Real-time workflows will run before synchronous plugins.
  • Synchronous plugins will run before asynchronous plugins.
  • Asynchronous plugins will run before background workflows.
4. What is Execute and Execute Multiple?
Ans: Execute a single action, function, or CRUD operation.
Execute a Action: Xrm.WebApi.online.execute(winOpportunityRequest)
Execute a Function: Xrm.WebApi.online.execute(whoAmIRequest) 
CRUD Operations :
For Create a record: Xrm.WebApi.online.execute(createRequest)
For Retrieve a record: Xrm.WebApi.online.execute(retrieveRequest)
For Update a record: Xrm.WebApi.online.execute(updateRequest)
For Update a record: Xrm.WebApi.online.execute(deleteRequest)

Associated: Xrm.WebApi.online.execute(manyToManyAssociateRequest)
Dis Associated: Xrm.WebApi.online.execute(manyToManyDisassociateRequest)

Execute Multiple:
Execute a collection of action, function, or CRUD operations.

Follow the Link for more information: https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/xrm-webapi/online/execute

5. What is Retrieve and Retrieve Multiple? 
Ans: Retrieves a table record. ==> Xrm.WebApi.retrieveRecord(entityLogicalName, id, options)
Retrieves a collection of table records. ==> Xrm.WebApi.retrieveMultipleRecord(entityLogicalName, id, options)

Follow the Link for more information: https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/xrm-webapi/retrieverecord

6. What is Isolation Mode?
Ans: Plugin isolation mode signifies the level of security restrictions imposed on the plugin execution pipeline. The isolation mode is specified on the assembly level and not on the individual plugin step. 

When a plugin assembly is registered, it can either be registered in an isolated or sandbox mode or in a none mode. The sandbox is more secure and some actions are restricted. 


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

Comments

Popular posts from this blog

If any case created, then check for the same user how many cases are created with in 30 days, if more than 2 and less than 5 send a mail to team lead, if more than 5 and less than 9 then send a mail to manager using power automate.

Create approve & reject ribbon buttons, once click on approve it should change the status field to approve.If clicked on reject it should change to Reject. Based on status field change trigger work flow to send a email to stating request is approved/Rejected.

How to get and set values in plugins?