Document.Publish

Overview

Publishes document to specified folders and returns current document instance.

Document myDocument.Publish()

Publishes document to specified folders and returns current document instance.

Document myDocument.Publish(folderPath: string)

Arguments

string folderPath

Path of folder(s)

Remarks

This method changes State property to "Published" and saves the document.

If folderPath argument is specified, document will be attached to a specified folder. Path can be specified as a full path. If a specified folder does not exist, it will be automatically created.

After creating a new document, it's better to use this function instead of just Document.Save( ). This function will save it in a folder where the document can be accessed, and not just in the system and saving without an access like Document.Save( ).

Example

Publish a document to multiple folders.

var doc = $Documents.Get(id); doc.Title = 'Sample Document'; doc.Publish('Testing\Folder1;Testing\Folder2');

See Also

Copyright © 2010 - 2023 Emakin. All rights reserved.