4

I am deploying a customer portal. Right now I am going from a development sandbox to a staging sandbox.

I have CSS, PDF, PNG, and HTML files in a folder in Documents.

In my package.xml I tried:

<types>
        <members>*</members>
        <name>Document</name>
</types>

That didn't work Do I need to download all those files to a folder in Documents in the staging sandbox? Or is there a way to migrate the folder from one sandbox to another?

Thank you, Haya

4

I think all CSS, PDF, PNG, and HTML files in Documents are treated as Data/records and so can not be deployed from one sandbox to another sandbox. It is different from your static resources(which is meta data) which can be be deployed from one org to another.

So in short you will need to download your data and then again upload it in target org.

2
  • Thank you for your answer. Would you know if there is another way to migrate data/records besides using the deployment tools? – Haya May 21 '14 at 13:00
  • 1
    if you dont want to download and upload them again, you could use the Data Loader to move your documents. – AslamK May 21 '14 at 23:45
4

To retrieve Documents from ANT you need to mention the name of the folder in which the document is saved as well as the name of the folder & document together. Example:

folder

folder/image.gif

folder/image.png

folder/file.doc

Document

Retrieving Documents: http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_document.htm

Regards, Haya

1
  • To all reading this question this should be the correct way forward especially if you use the image document as an app logo. – zokito May 26 '15 at 16:37
0

Hana, You want to migrate documents from one sandbox to another, correct? If not, sorry! I am answering the wrong question here.

Files in Salesforce Documents are treated as files and not data. Things like Applications store their logos, start pages etc. there. They can be migrated from sandbox to sandbox using metadata API. Force.com IDE/ ANT can help you.

The trick is to realize that they are always part of a folder. They can be called "unfiled$public" but they are in a folder. If you use the Force.com IDE and look for Documents metadata type, you will find them there. Select the ones and their folders. Then, you can "Deploy to Server" to move them to another sandbox Org.

If you need help with this, please let me know and I can walk you through this. You can contact me here: sridhar removethisstring @ dreamfactory.com

Good luck.

Sridhar

1
  • Thank you for your offer, Sridhar, but I resolved the issue and migrated my documents using ANT. I would like to ask you questions if I run into more issues. Regards, Haya – Haya May 23 '14 at 7:28

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.