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 / Replacing an activity ...
Power Apps
Answered

Replacing an activity table in a deployed managed solution with a standard table

(0) ShareShare
ReportReport
Posted on by 672

All

 

 

I am currently experiencing the above issue when trying to deploy a solution from Dev to Test. So is there a way to replace the table definition in the test environment? 

Alternatively, has anyone tried removing the table in the solution in dev and then updating the solution in test, so intending to remove the missing table?

 

I tried deleting the managed solution in test but to this "helpful" error . Note, the environment variables are not shared with any other solution.

 

Sql error: Statement conflicted with a constraint. The DELETE statement conflicted with the REFERENCE constraint "environmentvariabledefinition_environmentvariablevalue". The conflict occurred in database "db_crmcoregbr_20230816_12550932_8713", table "dbo.EnvironmentVariableValueBase", column 'EnvironmentVariableDefinitionId'. The statement has been terminated. CRM ErrorCode: -2147185375 Sql ErrorCode: -2146232060 Sql Number: 547

 

 

 

 

 

 

 

 

 

I have the same question (0)
  • cchannon Profile Picture
    4,702 Moderator on at

    I know of no way to issue BOTH a delete and a create operation during solution import. This applies not just to table definitions, but even to individual columns, web resources... everything.

     

    If you want to have table ABC "become" table XYZ via solution import (and they occupy the same name or identity) then there is no alternative but:

    - One solution import that deletes table ABC

    - A second solution import that creates table XYZ

  • cchannon Profile Picture
    4,702 Moderator on at

    To be clear, I think what you were asking about is:

     

    "I have table new_mytable with IsActivityEntity = True. I want to replace it with new_mytable with IsActivityEntity = false"

     

    (or something very close to that)

  • westerdaled Profile Picture
    672 on at

    @cchannon 

     

    Thanks for the reply. If I understand you correctly, I could set IsActivityEntity = False  in Test (in managed solution). 

     

    Unfortunately,  the Entity table is readonly - our table is set to true of course.

     

    westerdaled_0-1712219068585.png

     

     

     

    Looking at other posts, I see my issue with not being able to delete the managed solution in test is being experienced by other users and there isn't a fix yet.

  • westerdaled Profile Picture
    672 on at

    We tried the importing the solution without the offending table and this didn't work, unfortunately. 

  • Verified answer
    cchannon Profile Picture
    4,702 Moderator on at

    No, once a table has been set as an Activity table, it cannot be edited. Your only option is to delete the table in its entirety and make a new table that is NOT an activity table. To do this via solution, you would need to remove all dependencies on that table one at a time, then remove it, then make a new solution at that time where the offending table has been deleted. That solution is your "subtractive" solution and is what you will use to delete the table in higher environments. Then, create the new table and make another solution. This is the "additive" solution.

     

    In the destination environment then, you will import the subtractive solution, then the additive solution and the end result will be your table as NOT an activity. However this process is laborious and it will delete the data in that table, so you should think carefully before proceeding with this approach.

  • westerdaled Profile Picture
    672 on at

    @cchannon 

     

    You are absolutely correct, as this is what we did in the end ( in our dev environment).  Took a couple of hours and I was back working on a newly created activity  table .  Indeed, we were able to import my main form with all its event handlers onto the new table . 

     

     

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 414

#2
Valantis Profile Picture

Valantis 408

#3
timl Profile Picture

timl 339 Super User 2026 Season 1

Last 30 days Overall leaderboard