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.
- Real-time workflows will run before synchronous plugins.
- Synchronous plugins will run before asynchronous plugins.
- Asynchronous plugins will run before background workflows.
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
Post a Comment