Skip to content

Publish

Publishes document to specified folders and returns current document instance.

1
myDocument.Publish():Document

Publishes document to specified folders and returns current document instance.

1
myDocument.Publish(folderPath: string):Document

Parameters

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( ).

Publish a document to multiple folders.

1
2
3
4
var doc = $Documents.Get(id);

doc.Title = 'Sample Document';
doc.Publish('Testing\Folder1;Testing\Folder2');

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( ).

Publish a document to multiple folders.

1
2
3
4
var doc = $Documents.Get(id);

doc.Title = 'Sample Document';
doc.Publish('Testing\Folder1;Testing\Folder2');

See Also