Skip to main content
Community site session details

Community site session details

Session Id : 84ja6BDeUds8A4bii0udg9
Power Apps - Microsoft Dataverse
Answered

Importing a solution with a N:N relationship - "Entity [tableName] cannot be in a custom entity association"

Like (0) ShareShare
ReportReport
Posted on 16 Oct 2023 09:17:52 by 177

I've got a support request open with Microsoft support - but they haven't made any progress in 3 weeks. Has anyone encountered this issue and found a solution?

 

This is complete block on progress for the project I'm working on.

 

The tables already exist in the target environment from a previous version of the managed solution, I'm trying to import an update including an N:N (Many-to-Many) relationship between the 2 tables.

 

Steps to reproduce:

  1. Export Solution as managed from source environment
  2. Import Solution to target environment
  3. Import fails with error "Entity [tableName] cannot be in a custom entity association"

This is the error displayed as a notification in the target environment, and also the error shown in the full Error log XML file (I know sometimes the notification error can be misleading).

 

Using the API service to view the metadata, indicates I should not encounter this error as I see this in the metadata regarding the tables in both the source and the target environment:

 

 

 

 

"CanBeInManyToMany": 
{ "Value": true, "CanBeChanged": false, "ManagedPropertyLogicalName": "canbeinmanytomany" }, 

"CanBeInCustomEntityAssociation": 
{ "Value": true, "CanBeChanged": false, "ManagedPropertyLogicalName": "canbeincustomentityassociation" }

 

 

Another symptom is that I am unable to create the N:N relationship directly in the Target environment (using an Unmanged solution layer) - I get the same error message pop up in the UI.

 

Can anyone help?

 

Thanks.

  • tfraser Profile Picture
    177 on 28 Feb 2024 at 12:39:26
    Re: Importing a solution with a N:N relationship - "Entity [tableName] cannot be in a custom entity association"

    Have ensured your entity has a default 'associated' view?

  • Community Power Platform Member Profile Picture
    on 28 Feb 2024 at 12:29:57
    Re: Importing a solution with a N:N relationship - "Entity [tableName] cannot be in a custom entity association"

    Can you please in details explain what that means. I have the same issue and can't resolve it. 

  • Verified answer
    tfraser Profile Picture
    177 on 07 Nov 2023 at 17:18:47
    Re: Importing a solution with a N:N relationship - "Entity [tableName] cannot be in a custom entity association"

    I finally have a solution for this issue.

     

    During the solution import there is validation for the relationship eligibility that will check if the Custom Entity can be an association entity, and if so we need to assure that the SavedViews associated exists, otherwise the system will not allow to create the ManyToMany relationship.
    So, the Custom Entity must have an association subgrid (view), and need to add all associated views included in the solution along with N:N relationship.

  • tfraser Profile Picture
    177 on 16 Oct 2023 at 13:08:00
    Re: Importing a solution with a N:N relationship - "Entity [tableName] cannot be in a custom entity association"

    Hi @FLMike . Thanks for the response. 

     

    I'm always updating the solution as an upgrade.

     

    In trying to resolve this I've created multiple fresh environments and tried importing various versions of the solution, starting from scratch.

     

    A couple of weeks ago I thought it was resolved as I was able to import various incremental updates to the solution, adding individual tables and relationships a bit at a time, until it stopped working again.

     

    In that scenario I didn't import any solutions that changed any of the components but I did import a simple Model-Driven app that was dependent on the solution.

     

    I then created another fresh environment and tried importing the solution without anything else and it failed.

     

    Edit - to cover off all of you questions - yes - all of the tables in the solution are customizable. 

     

  • Michael E. Gernaey Profile Picture
    46,507 Super User 2025 Season 2 on 16 Oct 2023 at 12:56:47
    Re: Importing a solution with a N:N relationship - "Entity [tableName] cannot be in a custom entity association"

    Hi @tfraser 

     

    Are you trying to Update / Upgrade or Patch the solution? And you said its managed right? Is that table itself marked as customizable?

     

    Has any other solution you imported in between the one it was created in and this new one, (including other solutions), changed it in any way? Made dependencies on it?


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Featured topics