+ Start a Discussion
Saravanan @CreationSaravanan @Creation 

Removing and Adding a namespace prefix character through ANT deployment

Hi Everyone,

1. I want to retrive a metadata from a org when we will create the package. I can able to retrive but after retrival in few places of the component like formulas the namespace prefix is added 'Test__' becasue of this I can't able to deploy to the sandbox or the developer org. If I need to deploy without any error I have to remove this namespace prefix manually. Is there any way while retriving the metadata we can able to remove the namespace prefix in standard salesforce retrival?

<target name="NPD">
      <sf:retrieve username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="test" unpackaged="test/package.xml"/>

2. Once the development is done in the Sandbox we want move all the metadata to org where we will create a package.Before moving do i need to manually update the namespace prefix eg. IN workflow field update formulas.  Is this correct ? if yes can we able to automate this process.

Thanks in advance!!
Prashanth SamudralaPrashanth Samudrala
Hi Saravanan - If you are trying to deploy a package from an Org with a namespace prefix to an org without a namespace prefix - 

1. No, there is no way to remove the namespace prefix using the standard retrieve. An ideal way would be to open the package.xml in a editor and mass replace the namespace prefix along with the (__). 

2. If the destination Org has a namespace enabled then you will need to add this prefix to all the fields in your package manifest. No way to "automate" it.