0

Edit

Just to give more context to my question. In the org1 when I create a field I see it as 'abc__empname__c' In the org2 when I create a new field I see 'empname__c'

I have installed managed package from org1 to org2 and in the org1 I have namespace prefix and when I try to create a new field in the org2 in the custom object it's not adding the namespace prefix to the new field that I have created.

Do I have to turn or any setting? In the org2? Or when I package do I need to select any options?

I haven't done this before so i am new to package/namespace

0

The idea is that the package might have a field called ns__Abc__c (i.e. it is part of the package) and you can also add a field called Abc__c (it is your local customisation) to the custom object ns__Xyz__c provided by the installed package. So what you are seeing is part of the design: both objects and fields can have namespace prefixes and objects that have namespace prefixes can have fields added that do not have namespace prefixes.

If you want the field to appear in every org that the package is installed into then you should add the field in the org that you create the package in and it will automatically get the namespace prefix. You will then have to upgrade any orgs that the managed package is installed into.

If the field is something you only want in the one org (i.e. it's a local customisation) then it will have no namespace but everything should still work fine. (Though if the code in the managed package needs to query all the fields the query will have to make use of describe calls to find the local custom field and include it.)

  • Please see my updated question , so how can I change to same behavior ? – Nick Kahn Aug 19 '15 at 19:51
  • @AbuHamzah The idea is that only the managed package owner can add fields (or other components) that have the namespace. So you cannot add a namespaced field in org2: you will have to go back to org1 to add it, then re-package then update the package in org2. Or perhaps I misunderstand your comment? – Keith C Aug 19 '15 at 19:56

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.