Skip to content

vsix command add crmpluginregistration

PhuocLe edited this page Jun 20, 2026 · 2 revisions

Add CrmPluginRegistration adds or updates CrmPluginRegistration attributes on the current plugin or workflow class by reading Dataverse registration metadata.

Command Source

Field Value
Command class CommandAddCrmPluginRegistration
Command id CommandAddCrmPluginRegistration
Menu text Add CrmPluginRegistration

When It Appears

The command is visible when the cursor is inside a non-abstract C# class that DevKit recognizes as a plugin or workflow class.

It appears from the code editor context menu.

Requirements

Requirement Why
Shared project exists Generated registration attributes depend on shared DevKit code.
Current project references the Shared project The current class must compile with shared types.
DynamicsCrm.DevKit.Cli is installed The command uses registration attribute types from the CLI package.
Dataverse connection is available The command reads plugin/workflow registration metadata from Dataverse.

What It Does

  1. Gets the current C# class under the cursor.
  2. Verifies the Shared project exists and is referenced by the current project.
  3. Verifies the CLI package is installed.
  4. Detects whether the class is a plugin or workflow.
  5. Connects to Dataverse.
  6. Finds existing registered steps for the class.
  7. Generates CrmPluginRegistration attributes.
  8. Adds missing attributes or updates existing attributes with Dataverse step IDs.

Notes

If a class already has CrmPluginRegistration attributes without IDs, the command updates those attributes with IDs from Dataverse when it can match the registered step.

If no Dataverse step is found for the class, the command shows an error instead of adding speculative attributes.

Clone this wiki locally