Create Document in SDK and add to a field in an Object.
AnsweredI am using SDK to automatically create a Document from a Template. That is working well. I have an object with a Document Object Field.
I have the document ID after creation. I need to connect the document to the Object but am getting errors any way I try it.
There are two fields on the Object - new_document__c and a system generated one called new_document_unbound__c
I have tried setting the document ID on both fields. I have also tried to set the document ID_major_minor (e.g. 1234_0_1). All of them give errors:
When setting on new_document__c, I get an error which says Value in [New Document] is not allowed : Dynamic version reference must be set on parameter [New Document (unbound)]
When setting on new_document_unbound__c, I get error: The specified field [new_document_unbound__c] does not support Sdk interaction
So how do I set Object field to properly point at the new Document?
-
Official comment
Hi Joe,
You need to configure the document field on the object to reference a specific version of the document, not the latest. Navigate to the object field on the Admin side and ensure that the Document Version Reference metadata field is populated with the "Specific Version" value. For example:
Please sign in to leave a comment.
Comments
1 comment