Working with templates

For many object types, Lobster Data Platform / Orchestration supports the use of templates for new creation. Such templates can be created using Ribbonmakros in overviews or entry forms based on the data of an existing object. It is also possible to save object data of an unsaved state, for example, which also contains unfilled required fields, as a template in entry forms. The template contains almost all data of the 'original', only Working state, Tracking state and automatically filled detail data (ID, owner, creator, creation date, etc.) are not transferred.

When saving the template, the user can define a Name for it and decide whether it should be available Company-wide (for all users in the context of a company) or only personally (for the creator). Templates can also be made available to other companies via Company authorizations. The company context is also taken into account for personal templates. A user who works with changing company contexts can create specific personal templates for each company and only access his personal templates from other company contexts if Company authorizations are in effect.

Whether the details of these templates can be accessed via template management (see Entity templates) depends on the authorizations of the role used.

Access to a template when creating a new object also takes place via the Ribbonmakro-Befehl from an overview or entry form. Which templates are offered for selection depends on several factors:

  • The template type must correspond to the context of the ribbon macro, i.e. it must be the same object type.

  • The context (string) specified in the definition of the ribbon macro matches the context of the template.

  • The user has logged in with the company that owns the template or has read access to it based on Company authorizations.

  • The user is the creator of the template OR the template is company-wide in the current context and the company grants read access.

The new object is initialized with the data from the selected template and displayed in an entry form. The data from the template is already taken into account in the evaluation of Association criteria for the assignment of the 'suitable' form.

Configuration of ribbon macros for templates

images/download/attachments/62850997/image2018-10-4_8-53-38-version-1-modificationdate-1603696950860-api-v2.png

For ribbon macros, 3 commands (1) are available for using templates.

►NOTE◄ The directory assets/icons/entityTemplate contain possible icons for the creation of ribbons.

All 3 commands require a parameter:

images/download/attachments/62850997/image2018-10-4_8-54-52-version-1-modificationdate-1603696950854-api-v2.png

The context (1) can be used to control which templates of a business object should be used when calling the command.

The 3 commands can be repeated as often as required and grouped by their context.

e.g: 3 ribbon items for template_standard + 3 ribbon items for template_seafreight ...)

Command

Application

Example

Object template > Create template

The current business object is stored for the respective type under the specified context.

images/download/attachments/62850997/image2018-5-25_11_4_41-version-1-modificationdate-1603696950905-api-v2.png images/download/attachments/62850997/image2018-10-4_8-51-26-version-1-modificationdate-1603696950872-api-v2.png

After clicking on Save template (1), a dialog opens, which asks the user to enter a Name (2). The flag Company-wide (3) indicates whether this template should be available on a company-wide basis or only to the creator.

Object template > Delete template

The templates displayed in a menu can be deleted. Only those templates are displayed that were created by the user and have the specified context.

images/download/attachments/62850997/image2018-5-25_11_8_44-version-1-modificationdate-1603696950913-api-v2.png

Custom templates are displayed in the selection menu.

Object template > New from template

A menu displays the templates of the business object type that the user has created or that have been defined on a company-wide basis. The owner of the templates is either the company with which the user is logged in, or this company has received permission from the owner to read them. Only the templates that were saved with the specified context are displayed.

After selection, a new object with the data from the template is displayed in the detail view. When calling from an overview, the detailed view is opened.

NOTE

  • When executing 'New from template' the event 'New' is triggered. In the data context of the 'New' event, the data from the template is already available. In contrast to this, specifications from the default settings of an entry form, which is called via the 'New' menu function, cannot yet be accessed in the 'New' event.

  • If no template can be selected when executing 'New from template' because either no template has been created yet or none of the existing templates can be accessed, the function 'New' (without template) is executed.

images/download/attachments/62850997/image2018-5-25_11_8_10-version-1-modificationdate-1603696950911-api-v2.png

Custom templates are displayed in the selection menu.

►NOTE◄ The Ribbonmakros must be assigned via Association criteria (see also Working with association criteria).

In the template administration (see also Entity templates) created templates can be managed for all types and for all contexts.