DocumentSchemaManagerChangeDocumentSchema Method

Sets new details for schema

Definition

Namespace: FileHold.LibraryManager
Assembly: FileHold.LibraryManager (in FileHold.LibraryManager.dll) Version: 17.1.0.0
C#
[WebMethodAttribute(Description = "Sets new details for schema")]
public FieldInfo[] ChangeDocumentSchema(
	DocumentSchema documentSchema,
	bool forceRemovingFields
)

Parameters

documentSchema  DocumentSchema
id of schema to change
forceRemovingFields  Boolean
whether fields with metadata should be removed; if false - fields with metadata will be returned in fields collection

Return Value

FieldInfo
collection of fields which were not removed beacouse they contains metadata

Remarks

1. Update schema details (name, description, required, etc.) 2. Merge new fields with current fields 3. Remove appropriate fields NOTE: if forceRemovingFields flag is set to - true - fields are deleted even if they contain values - false - fields are deleted only if they do not contain values; in other case they are added to collection which will be returned 4. Perform changes (add new and update existing fields) 5. Set fields order

See Also