You need to sign in to do that
Don't have an account?
rohits83
Sample SOAP Message for Content Folder
Hi
I need to push a document in Content Folder in a workspace. I'm creating the below SOAP message but I'm nolt able to push the document using the below mentioned SOAP request message.
<urn:create>
<urn:sObjects xsi:type="ContentWorkspaceDoc">
<ContentDocument>
<Title>Title for Document</Title>
<LatestPublishedVersion>
<VersionData>getBinaryData()</VersionData>
</LatestPublishedVersion>
</ContentDocument>
<ContentWorkspace>
<Name>Name of the workspace</Name>
</ContentWorkspace>
</urn:sObjects>
</urn:create>
Some further tips if you use workspaces and custom fields on your Content record...
1. Insert ContentVersion
2. Insert ContentWorkspaceDoc (this associates the ContentDocument to the ContentWorkspace; you'll need the ContentVersion.ContentDocumentId to do this which requires a Select on what you just inserted)
3. Update ContentVersion with any custom fields - custom fields can't be added on the initial insertion call
If you think about it, this mirrors the Content UI - first the document is uploaded, then you associate to a workspace and then you get a chance to enter custom fields, if you use them.
Followup:
tags also can't be added as part of the Insert ContentVersion record. You also need to add the tags on an DML Update call. (step 3 above)