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
thsfthsf 

Change Namespace Prefix?

Hello,

The developer account for my company has 2 packages, neither of which have been published on the AppExchange.  The other day, I was experimenting with managed packages and namespace prefixes.  I selected one of the packages to be managed, and choose a suitable namespace prefix for it.  After doing this, I noticed that the namespace prefix was applied to both packages.

Knowing what I know now, I was wondering if it would be possible to change my company's namespace prefix to something that would better suit both packages (and potentially others at some point).

I suppose I could create another developer account and choose another namespace, but that is probably not a great thing to do.

Any suggestions?

rwoollenrwoollen
Once you add a namespace to your organization, everything in that organization is associated with the namespace.  However, for packages only the managed package is associated with the namespace.

To be clearer, if you install the managed package in another organization the components in the package will have your namespace.

If you install the unmanaged packages in another organization the components in the unmanaged package will not have your namespace.

-- Rob
thsfthsf
Thanks Rob.  What you are saying makes sense.  However, at some point it is possible that we will want to have *several* managed packages.

My situation is similar to if I was working at Microsoft and was creating a package for Microsoft Word.  The namespace "WORD" would be applicable to my current package, but wouldn't make sense if at some point down the line I wanted to create a separate package for Excel or Access.  Instead, a better namespace would be "MSFT".

At this point, I am wondering if it would be possible to change my mistakenly chosen "WORD" namespace to "MSFT" since we have not published anything yet.

shillyershillyer

It is not possible to change the namespace. You may want to post this as an idea on the IdeaExchange. Post it under the Application Distribution category.

Best,

Sati

rwoollenrwoollen
In general, the namespace is associated with the managed package not the publishing company.  If you wanted to have multiple managed packages published by your company, then each managed package would have its own namespace and its own development organization.  (You cannot have more than 1 managed package developed in a single organization.)

It sounds a bit restrictive at first, but development organizations are very lightweight (and free). 

-- Rob
thsfthsf
Thanks Sati and Rob.  I think I have what I need now.

It sounds like in general you can only have 1 managed package per organization.  For some reason, I thought if you became a Salesforce super star, you could have more than 1 managed package?

If we are planning to have multiple managed packages, we will have to setup multiple developer organizations.  This is OK.

At some point it would be nice to let single organization manage multiple packages.  That's something I might consider posting to the IdeaExchange.
prageethprageeth
Dear rwoolen, you said that when I introduce a namespace prefix, everything in my organization is associated with that namespace. Now I have a question. Should I add the namespace to all the custom fields, tables used in my apex classes, if I hope to create a managed package to upload in to the AppExchange. If I do not add the namespace prefix, will my application not work in other organizations? Thanks.
rwoollenrwoollen
No, you do not need to add your namespace prefix into the apex code.  The system tracks namespace by component so when your managed package containing apex code is installed in the subscriber org, your code still has your namespace.  It can then refer to anything in its own namespace without qualifying it.


prageethprageeth
Thanks Swoolen. Now I understand how the namespace works. Thanks again.