1. Home
  2. Administrators
  3. Automation
  4. Automatic action: Create a new document

Automatic action: Create a new document

How does it work

In the process of a category, we can define a series of automatic actions that are carried out when advancing through a transition. One of them is the “New Document” action:

This functionality allows you to create a new document from another category and thus link several workflows.

The New Document window allows you to choose the category of the document to be created:

In this window, the option “Only when the following condition is met” allows you to write a JavaScript formula to decide in which cases the document should be created.

The formula must return a boolean value (true/false) that indicates if the condition is met based on the values of the fields of the original document:

What is it for

This functionality has many applications. One of the most interesting is to create several “New Document” actions of different categories in the same transition and configure the formulas of each of them so that only the appropriate one is fulfilled in each case.

For example, a Request category moving through a transition in its process might create: a new Cancellation category document or a new Change category document. You can configure the creation of the two documents and the formula of both actions so that only the appropriate one is executed depending on the type of request.

Updated on 6 de November de 2023
Was this article helpful?

Related Articles