[This is preliminary documentation and is subject to change.]
Namespace: ContentStudio.Document.EPT
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Parameters
- properties
- Type: ContentStudio.DocumentCSDocument
An instance of a CSDocument class that contains properties of the document to save. This argument can be null (Nothing in Visual Basic) to use default values.
The following CSDocument properties are ignored with this implementation.- DocumentName (use the DocumentName property instead
- Content
- DocumentID
- CategoryID
- FileName
FileName can be specified in version 5.2 and later when a new document is created for the first time and the DocumentFileNamingConvention property is set to UserDefinedFileName - FileExtension
FileExtension is ignored in version 5.0 only.
The following properties are only taken into consideration when creating new documents
- ParentDocumentID
- OrderInHierarchy
- Guoid
- FileName (see above for more information).
You only have to set values for the properties in the DocumentProperties object that you would like to change (document update) or supply non-default values for (document creation).
Note The FileExtension property can only be set to one of the extensions that are allowed for EPT documents.
This is a breaking change compared with version 5.0 where the FileExtension was ignored due to the fact that EPT document only could have .xml as file extension.If you save a document that has a file extension that no longer meets the policies, either the category file extension policy or the global EPT document policy, the document cannot be saved with that extension and a CSException (The document type is not allowed, number 1521) is thrown.
Exception | Condition |
---|---|
CSException | A business rule was violated in the underlying Content Studio database |
ArgumentOutOfRangeException | A value was passed in that lies outside of the acceptable data range. |
SqlException | An error occurred when executing the command against the Content Studio database |
ArgumentNullException | A string parameter was null and the parameter does not accept null values |
ArgumentException | Occurs when creating a new document: documentName cannot be null or empty |
InvalidOperationException |
Occurs only if schema binding is enabled and ValidateOnSave is false. The number of fields does not match the number of fields specified in the schema or Cannot save. The field "%FieldName%" does not exist in the EPT schema. |
XmlSchemaException | When schemabound and ValidateOnSave is true and the data set does validate against the Ept schema. |
This method does not approve (publish) or check in the document. In addition to the Xml content you can also save document properties with this method by using the properties parameter.
Note |
---|
The behavior of this method changed in Content Studio 5.2. Prior to version 5.2 Save sends the entire Ept document to the underlying CS API but in version 5.2 only the fields that are changed is sent. The underlying Content Studio API ensures that all fields are saved anyway. This change solves some issues with the Server Side validation that could generate validation errors in some cases even though the field that caused the validation problem was not changed. |