Skip to content

New

Creates an unsaved Draft document with new version and branch IDs, initially version 1.0.0.

1
$Documents.New(title: string, contentType?: string):Document

Parameters

string title
    The title of the document.

string contentType optional
    Optional published content type name or ID for the profile form.

Remarks

Example

1
2
3
var document = $Documents.New("Contract", "Contract");
document.Files.AddString('Contract text', 'contract.txt');
document.Publish('Contracts');

See Also