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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Mistakenly deleted custom entity from UNmanaged solution

(0) ShareShare
ReportReport
Posted on by 1,549

I mistakenly deleted a custom entity from our main unmanaged solution in our Dev Environment.

That solution was previously imported as a managed solution in our Production Environment.

Now, I want to recreate it in our unmanaged solution. But I thought I'd need to get rid of it in our Production Environment.

I can't delete it since it is managed.

Also, if I import the Managed solution without the custom entity, the said entity is still part of the CRM...

Any advice?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi,

    This is pretty easy to fix. Create a new solution on Production and include the entity you deleted. Then export that as unmanaged and import it to your dev environment. Once it's back on your dev environment, you can add it to your main solution and delete the temp solution from the org. Everything will work fine with future solution deployments because it's the same entity being moved around, as opposed to creating a new one which could be recognized as being a 'different' entity..

    Hope this helps! I'd appreciate if you'd mark this as a Verified answer.

    Thanks,

     Aiden

    { edited for clarity }

  • Verified answer
    Royal King Profile Picture
    27,686 on at

    Rather than re-creating the deleted entity , create a new solution in production environment and add deleted entity to this solution then exports it as unmanged and re-import into dev. It should resolve your problem.

  • mreed Profile Picture
    on at

    I think I'm confused - do you want the custom entity or do you want to remove the custom entity from your production environment??

  • Royal King Profile Picture
    27,686 on at

    create a new solution production crm and add the custom entity to this solution ( then one you deleted in the dev crm). Export this solution as unmanged and import into your dev crm and publish it.after this add your custom entity back to your old solution from where you deleted this entity. Once this done you can export it has managed solution and import into other system.

  • yleclerc Profile Picture
    1,549 on at

    I created a new solution on Production and included only the deleted entity. I exported it as Unmanaged. Then I tried importing it in my Dev environment. The import failed with this message:

    The import of the solution failed. The following components are missing in your system and are not included in the solution. Import or create the missing components and then try importing this solution again.

    And then there is a long list of said Entity related missing components.

    I'm lost...!

  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Yvan,

    You'll get the is your deleted entity has relationships to other entities that are only on production, if there are other resources, etc. You can get rid of this error by ensuring all the dependencies are also included in your solution. To do that, open up your solution on production, select the entity and click Add Required Components.

    Hope this helps! Let me know if you have any more issues.

    Thanks,

     Aiden

    required-components.png

  • yleclerc Profile Picture
    1,549 on at

    Thanks very much Aiden,

    I tried this too, but that did not fix my problem. It seems almost nothing gets included in the solution.

    Looking at the solution.xml file, I actually can see the missing dependencies. Here is a short part of it.

    <MissingDependencies>
    <MissingDependency>
    <Required key="0" type="1" schemaName="visits" displayName="Visits" solution="Main Solution (2015.11.07)" />
    <Dependent key="0" type="1" schemaName="visits" displayName="Visits" />
    </MissingDependency>
    <MissingDependency>
    <Required key="0" type="1" schemaName="visits" displayName="Visits" solution="Main Solution (2015.11.07)" />
    <Dependent key="0" type="1" schemaName="visits" displayName="Visits" />
    </MissingDependency>
    <MissingDependency>
    <Required key="0" type="1" schemaName="visits" displayName="Visits" solution="Main Solution (2015.11.07)" />
    <Dependent key="1" type="2" schemaName="regardingobjectiddsc" parentSchemaName="visits" parentDisplayName="Visits" />
    </MissingDependency>
    <MissingDependency>
    <Required key="0" type="1" schemaName="visits" displayName="Visits" solution="Main Solution (2015.11.07)" />
    <Dependent key="0" type="1" schemaName="visits" displayName="Visits" />
    </MissingDependency>

     

    And it goes on and on...

  • yleclerc Profile Picture
    1,549 on at

    I finally got lucky. I found a backup of my unmanaged solution that dated a few weeks back. I used it as a "hold" solution in order to reintroduce the deleted entity in the system. A few steps were required to make sure I wasn't going to lose the work that had been done in the meantime. Here are the steps:

    1. Exported the main solution as it was today - as unmanaged

    2. Renamed the old backup "hold" - I also changed the Uniquename and the LocalizedName Description so it differs from the solution that's already installed.

    3. Imported that old backup. It actually overrid some of my most recent customizations.

    4. Included the deleted entity in my main solution

    5. Deleted the hold solution

    6. Re-imported the solution I exported up in #1.

    7. Published all customizations

    Boom! Now I'm exactly where I was originally, and I have that damn deleted entity back!

    Thank you all for the advice! It showed to be very helpful

    Yvan

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans