This object is used for methods that are only available in the context of the Projects app. Example of using this object in a business process script in the Projects workspace:

const project = Context .data.project;
if (project) { 
    await Namespace.app._project. initByTemplate(project); 
} 

Type parameters

Hierarchy

  • ApplicationProject

Methods

archive

  • Archive a project. The method changes a project’s stage to Archived and closes all project tasks.

    const projectApp = Context.fields. _project.app;
    const project = Context.data._project; 
    await projectApp. archive(project); 
    

    Parameters

    Returns Promise<void>

initByTemplate

  • Initialize the project with the initial data from a template. The method is used in the Generate from template system business process).

    const project = Context.data._project;
    if (project) { 
        await Application.initByTemplate(project); 
    } 
    

    Parameters

    Returns Promise<void>

restore

  • Restore a project from the archive. The method changes the project stage to Draft.

    const projectApp = Context.fields._project.app;
    const project = Context.data._project; 
    await projectApp.restore(project);  
    

    Parameters

    Returns Promise<void>