recordDocument Method

Insert or update a RepositoryLink element to represent the source document. Also inserts or updates an ExternalSourceAspect for provenance. The document's ID is sourceDocument.docProps.docGuid, if defined; else, sourceDocument.docProps.desktopUrn, if defined; else, sourceDocument.description. The document's ID is stored in the code value of the RepositoryLink and the identity of its ExternalSourceAspect.

recordDocument(sourceDocument: SourceDocument): RecordDocumentResults

@throws IModelError if a RepositoryLink for this document already exists, but there is no matching ExternalSourceAspect.

@see SourceItem for an explanation of how an entity from an external source is tracked in relation to the RepositoryLink.

Parameter Type Description
sourceDocument SourceDocument Identifies the document.

Returns - RecordDocumentResults

Defined in

Last Updated: 17 December, 2024