4

I have one dev org from where I have created one Managed package. I want the same package created as UnManaged package. So I created the Unmanaged package from the same org. But when i try to install it on new org , it gives me errors related to some objects.

My Question here is - > Can we create an unmanaged package from the namespaced components of Managed package?

4

You can create a managed and unmanaged package in the same organization, and the components can be shared between the two. We have successfully done this with a package containing 500 classes, about 1000 fields over 20 custom objects, and hundreds of Visualforce pages and components. Usually, errors in a non-namespaced version occurs because there are duplicate fields, object names, or code in the target organization; that's the purpose of a managed package, to avoid those errors by using a namespace. Usually, you'll have to delete or rename the conflicting elements before you can deploy the unmanaged package successfully. Also, keep in mind that since the namespace does not exist for the unmanaged elements, you must take care not to write code that specifically references the namespace, or the unmanaged package will fail. For example, if you write the following code:

ns__Event__c[] records = [SELECT Id, Name, ns__Start__c, ns__End__c FROM ns__Event__c WHERE ns__Start__c = THIS_WEEK];

Your code won't install because of the namespace embedded in the query. If you instead change the code to remove the namespace, it will work in both the unmanaged and managed packages.

0

Is there a particular reason why you are using the same org ? If you have source code control in place it might be easier to just create a new Dev org and pull from your source code repo.

With respect to your specific question, I can see how the namespace would be causing issue. When you create the managed package in your org, everything gets given a namespace in your org. Now you are creating a new unmanaged package, in which the components will contain the namespace of the managed package.

What is the specific error you are getting when you install ?

  • 1
    What's "SCC" and why is it in a palace? – pchittum Dec 8 '13 at 1:10
  • Source code control - updated answer and corrected typo. Thanks Peter – Mahat Hussein Dec 8 '13 at 6:34
  • I dont have SCC in place, but just using Eclipse to deploy my code from dev org to packaging org. The error being faced now is - 1. Event__c : eventedit does not exist or is not a valid override for action clone 2. null:sObject type <Namespace ><Custom_Object__c> is not supported – Kaushik Ray Dec 8 '13 at 11:14
  • Have you tried deploying in small increments, i.e. deploy just the objects first (and only the ones you really need), then deploy the VF pages and Apex Classes etc – Mahat Hussein Dec 9 '13 at 9:16
  • I already have a huge code base, so was not going on that way. I was looking for some direct way, with which i can create the unmanaged package after creation of managed package. – Kaushik Ray Dec 9 '13 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.