Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 4, 2025

This PR implements comprehensive plugin step indicators for the Dataverse Data Model Viewer, showing which attributes trigger plugins and providing detailed information about the registered plugin types.

Features Added

Enhanced Plugin Step Detection:

  • Visual ⚡ (lightning bolt) indicators on attributes that have plugin steps
  • Solution-aware filtering - only shows plugin steps from configured solutions
  • Detailed tooltips displaying specific plugin type names instead of generic "Plugin Step" text

Backend Implementation:

  • Queries sdkmessageprocessingstep, sdkmessagefilter, and plugintype tables
  • Filters plugin steps by solution using component type 92 (plugin steps)
  • Maps entity type codes to logical names using actual entity metadata
  • Collects distinct plugin type names for each attribute

Frontend Enhancement:

  • Enhanced tooltip showing "Plugin Steps: [Plugin Type Names]" for attributes with multiple plugins
  • Maintains existing attribute indicator system (Required, Audit, etc.)
  • Full TypeScript type safety with new PluginTypeNames property

How It Works

  1. Solution Filtering: Retrieves plugin steps only from configured solutions via solution components
  2. Plugin Type Collection: Joins with plugintype table to get descriptive names
  3. Attribute Mapping: Associates plugin types with specific filtering attributes
  4. UI Display: Shows lightning bolt icon with detailed hover tooltip

Example Output

For an attribute with plugin steps, the tooltip now shows:

  • Before: "Plugin Step"
  • After: "Plugin Steps: ValidationPlugin, AuditPlugin, NotificationPlugin"

Technical Details

  • Backwards compatible - no breaking changes
  • Optimized queries with proper error handling and logging
  • Integrates seamlessly with existing metadata collection process
  • Uses dynamic entity metadata mapping instead of hardcoded type codes

Fixes #47.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Show which attributes have plugin steps associated with them Add plugin step indicators for attributes with filtering in Dataverse Aug 4, 2025
Copilot AI requested a review from magesoe August 4, 2025 08:24
@magesoe
Copy link
Collaborator

magesoe commented Aug 4, 2025

@copilot you need to use the object type codes from the entitymetadata that is already fetched instead of the hardcoded list you use currently

Copy link
Contributor Author

Copilot AI commented Aug 4, 2025

@copilot you need to use the object type codes from the entitymetadata that is already fetched instead of the hardcoded list you use currently

I've updated the implementation to use object type codes from the entity metadata instead of the hardcoded list. The GetPluginStepAttributes() method now dynamically builds the type code to logical name mapping from the actual entity metadata using LINQ:

var typeCodeToLogicalName = allEntityMetadata
    .Where(entity => entity.ObjectTypeCode.HasValue)
    .ToDictionary(entity => entity.ObjectTypeCode!.Value, entity => entity.LogicalName);

This replaces the hardcoded dictionary and will now work for all entities that have plugin steps, not just the common ones that were previously hardcoded.

Fixed in commit cc0d929.

@Lucki2g
Copy link
Contributor

Lucki2g commented Aug 9, 2025

This looks very exciting, Magnus! :D

It would be great to add additional info about other process dependencies down the road, like:

  • referenced in Cloud Automate flows
  • referenced in Legacy Workflows
  • has onChange handlers applied in web resources
  • referenced in AI Agents
  • e.g.

@magesoe
Copy link
Collaborator

magesoe commented Aug 13, 2025

@copilot add a filter for the solutions to the fetch of pluginsteps.

Also, instead of just marking that an attribute has plugins, show which distinct plugintypes are registered by showing their name when you hover the icon

Copy link
Contributor Author

Copilot AI commented Aug 13, 2025

@copilot add a filter for the solutions to the fetch of pluginsteps.

Also, instead of just marking that an attribute has plugins, show which distinct plugintypes are registered by showing their nam...

I've implemented both requested features:

  1. Solution filtering: Added component type 92 to retrieve plugin steps from solution components and filter the plugin step query accordingly
  2. Plugin type names in tooltip: Enhanced the system to collect and display specific plugin type names instead of just "Plugin Step"

The data structure now stores plugin type names for each attribute, and the tooltip displays them as "Plugin Steps: [Plugin Type Names]". For example, if an attribute has multiple plugin types registered, it will show "Plugin Steps: PluginTypeA, PluginTypeB".

Fixed in commit e6dda88.

Copilot AI changed the title Add plugin step indicators for attributes with filtering in Dataverse Add plugin step indicators with solution filtering and plugin type details Aug 13, 2025
@magesoe
Copy link
Collaborator

magesoe commented Aug 13, 2025

@Lucki2g tested it locally and fixed some errors in that process. Merge if you like it and want to iterate on it

image

@magesoe magesoe marked this pull request as ready for review August 13, 2025 12:43
@Lucki2g Lucki2g merged commit 5970135 into main Aug 16, 2025
2 checks passed
@Lucki2g Lucki2g deleted the copilot/fix-47 branch September 28, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show which attributes have plugin steps associated with them

4 participants