PL 400 Plugin Development 3 — Questions and Answers
Question 1: Which NuGet package provides the core assemblies needed to build a Dataverse plugin?
- Microsoft.PowerApps.CoreFramework
- Microsoft.CrmSdk.CoreAssemblies (Correct answer)
- Microsoft.Dataverse.Plugin.SDK
- Microsoft.PowerPlatform.Dataverse.Client
Correct answer: Microsoft.CrmSdk.CoreAssemblies
Microsoft.CrmSdk.CoreAssemblies contains Microsoft.Xrm.Sdk.dll and related assemblies required for plugin development.
Question 2: What is the maximum allowed execution time for a synchronous plugin before Dataverse terminates it?
- 30 seconds
- 2 minutes (Correct answer)
- 5 minutes
- 10 minutes
Correct answer: 2 minutes
Synchronous plugins must complete within 2 minutes; exceeding this limit causes Dataverse to throw a timeout exception.
Question 3: In plugin development, what is the role of the PluginBase class pattern promoted by the Power Platform plugin template?
- It replaces IPlugin so you don't have to implement Execute directly
- It provides helper methods for tracing, service resolution, and context extraction (Correct answer)
- It automatically registers steps in the Plugin Registration Tool
- It enforces sandbox isolation at compile time
Correct answer: It provides helper methods for tracing, service resolution, and context extraction
PluginBase (or LocalPluginContext) encapsulates boilerplate service resolution and tracing setup, leaving subclasses to implement only business logic.
Question 4: A plugin needs to access a secure configuration value (e.g., an API key). Where should this value be stored?
- In the plugin assembly as a constant
- In environment variables on the server
- In the Secure Configuration field of the plugin step (Correct answer)
- In an Azure Key Vault referenced by hardcoded URL
Correct answer: In the Secure Configuration field of the plugin step
The Secure Configuration field is encrypted and only accessible to plugin code at runtime, making it the appropriate place for secrets.
Question 5: What is the primary difference between Pre-Operation and Post-Operation pipeline stages for a plugin?
- Pre-Operation runs before validation; Post-Operation runs after validation
- Pre-Operation fires before the database write; Post-Operation fires after the write but within the same transaction (Correct answer)
- Pre-Operation is synchronous only; Post-Operation supports async
- Pre-Operation has access to entity images; Post-Operation does not
Correct answer: Pre-Operation fires before the database write; Post-Operation fires after the write but within the same transaction
Pre-Operation runs after core platform validation but before the data is persisted, while Post-Operation runs after the write — both inside the transaction.
Question 6: When deploying a plugin assembly using the Plugin Registration Tool, which signing requirement must the assembly meet?
- The assembly must be signed with a certificate from a public CA
- The assembly must be strong-named (Correct answer)
- The assembly must be signed with an Authenticode signature
- No signing is required for sandbox mode
Correct answer: The assembly must be strong-named
Dataverse requires plugin assemblies to be strong-named (signed with a key pair) before they can be registered.
Question 7: Which execution context property tells a plugin whether it was triggered by another plugin or workflow rather than a direct user action?
- context.IsInTransaction
- context.Depth (Correct answer)
- context.IsOfflinePlayback
- context.ParentContext
Correct answer: context.Depth
context.Depth increments each time a plugin triggers another plugin, so a value greater than 1 indicates the plugin was invoked indirectly.
Which NuGet package provides the core assemblies needed to build a Dataverse plugin?