web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Unable to Register New...
Power Apps
Suggested Answer

Unable to Register New Step for Plugin

(0) ShareShare
ReportReport
Posted on by 1,121

Hello Everyone,

I have a requirement to restrict an Account from having multiple Service Offerings associated with it if those Service Offerings link to the same underlying Service Master record.

 

The custom C# plugin code is complete, compiles successfully, and is correctly deployed to the Dataverse environment. However, we are currently blocked at the final deployment step: registering the plugin step in the Plugin Registration Tool (PRT).

 

When attempting to register the step for the Associate message at the PreValidation stage, the official Microsoft PRT consistently rejects the configuration with the error: "Invalid Primary Entity or Secondary Entity specified. Please re-enter the data."

 

I have tried exchanging the primary and secondary entities but the tool doesn't take both of them as primary entity. The logical names are for sure correct.

 

 

Service Offering has a lookup column (Service Name) to Service Master table. Account and Service Offering has got Many-Many relationship

 

 

When registered without primary and secondary entity, I am able to achieve the primary task of restricting an account having multiple service offerings of same underlying Service Master record. But the association to fresh and New Account error out.

 

What exactly have to be checked here? I have ran out of options 😭

 

I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,978 Moderator on at
     
    Can you please verify the Relationship Type between the 2.
     
    Is it 1:N N:1 or is it N:N?
  • rameshmukka Profile Picture
    1,121 on at
    It is many to many only. @Michael E. Gernaey

     
    Thanks and Regards,
    Ramesh
  • Suggested answer
    Tomas Pivny Profile Picture
    28 on at
    Hi,
     
    afaik, plugin steps registered for the Associate/Disassociate messages cannot be scoped to a specific entity. You have to implement a guard clause to check for the relationship name inside the execution context.
     
    if (!context.InputParameters.Contains("Relationship"))
    {
        return;
    }
    
    var relationship = (Relationship)context.InputParameters["Relationship"];
    if (relationship.SchemaName != "specific_relationship_name_to_check_for")
    {
        return;
    }
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,055

#2
Valantis Profile Picture

Valantis 666

#2
11manish Profile Picture

11manish 666

Last 30 days Overall leaderboard