function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Robert Webber 6Robert Webber 6 

Duplicates After Managed Package Installation

I have been updating my sandbox using the ant migration tool. My sandbox has all my test data. I created a managed package from my dev environment and uploaded it successfully. I used the link to log into my sandbox to install. After installation, the records are not visible, and I have multiple tabs with the same name. Apparently, it doesn't remove the components with the same name and adds them with an indication that they are managed.

Do I have to manually delete all the other components? And, why can't I see the data. I know it's in there with a query from the developer console.

Help please.
ShirishaShirisha (Salesforce Developers) 
Hi Robert,

Greetings!

If the custom VF page or lightning tabs are of same  Name then they will be overriden whenever you try to deploy the changes using ANT.If they are Objects you can't create two tabs for the same Object.

I would suggest you to check the Tabs in UI and see,if they are of different VF pages/lighting compoenents with the same names.

In order to see the Tabs,you can go to Setup>Search for Tabs in Quick FindBox> check under tabs for the same name tabs to confirm the same.

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
AnudeepAnudeep (Salesforce Developers) 
What are the components in your managed package? 

What is the profile for this User? Does that profile has access to objects of the managed package? 
Robert Webber 6Robert Webber 6
Thanks for your responses. It appears that my objects were duplicated. One object has the namespace prefix that was there when I built the sandbox with the ant migration tool, and apparently one added without. I'm not sure how to recover from this and still be able to use the existing data. Object security for all objects is set to R/W. Any ideas?

User-added image
ShirishaShirisha (Salesforce Developers) 
Hi Robert,

Greetings!

Seems like you have deployed the custom Objects and the other Object which is with the namespace is from managed package.

You will not be able to delete/remove the Objects with the namespace like CxFO__Annual_ForeCast__c since we it is part of the managed package but you can delete the Objects without namespaces like Annual_ForeCast__c.

You can delete the Objects using destructiveChanges.xml to delete all the duplicated Objects by including them in one file.

Reference:https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_deleting_files.htm

Regards,
Shirisha Pathuri
Robert Webber 6Robert Webber 6
Thanks. When I delete the old objects, will it delete my data that was in before I installed the managed package?
ShirishaShirisha (Salesforce Developers) 
Yes,it will delete the data on the Object as well.If you do not want lose the data then you can take backup of the data and upload/insert as per your requirement.

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Robert Webber 6Robert Webber 6
Well, I'm almost there. I decided to remove the installed package in the sandbox because the installation had created some associations between some VF pages that show a list view and the old objects so I  could not delete all. Uninstalled and made sure that I did not have any custom objects left in the sandbox. Created a new package from my dev environment and got the errors below when I tried to install in the sandbox.

I don't understand why there would be any conflicts because there are no custom objects left in the sandbox. Any ideas?


User-added image


 
David JEAN-GEORGESDavid JEAN-GEORGES
Hi. Did you fix your issue? I know it is a long time ago, but I just go the same issues
Robert Webber 6Robert Webber 6
I believe I had to delete and recreate the relationships.