Class CustomFormApi
Object
CustomFormApi
Utility class to work with Custom Forms in Groovy code
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Helper class to create Custom Forms.static class
Helper class to work with Custom Forms statuses.static class
static class
Helper class to recalculate Custom Forms.static class
Helper class to update Custom Forms.static class
Helper class to work with Workflow statuses. -
Constructor Summary
ConstructorsConstructorDescriptionCustomFormApi
(FormulaEngineContext formulaEngineContext, ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionList
<CustomForm> FetchCustomForm
s which are created with the embeddedCustomFormType
.
Example:Fetch parent object from the childCustomForm
's object level (if built with the embeddedCustomFormType
).
Example:Initiates a builder object to create a new Custom Form.Initiates an operation with an existing Custom Form by id.
-
Constructor Details
-
CustomFormApi
public CustomFormApi(FormulaEngineContext formulaEngineContext, ObjectMapper objectMapper)
-
-
Method Details
-
fetchCurrentItemEmbeddedCustomForms
FetchCustomForm
s which are created with the embeddedCustomFormType
.
Example:
// Header logic of parent type: if (api.isInputGenerationExecution()) return null quoteProcessor.addOrUpdateOutput('ROOT', [ resultName: 'CurrentItemEmbeddedCustomForms', isOverridable: true, result: api.customFormApi().fetchCurrentItemEmbeddedCustomForms() ]) // If parent type is created with the JSON configuration creating CFOs based on the embedded CustomFormType // the parent object output will be updated with all CFO children in the result.
- Returns:
- Collection of
CustomForm
s child - Since:
- 14.1 - Caribou Lou
- See Also:
-
fetchCurrentItemParent
Fetch parent object from the childCustomForm
's object level (if built with the embeddedCustomFormType
).
Example:
return api.customFormApi().fetchCurrentItemParent()
- Returns:
- Parent object, ex. standalone
CustomForm
- Since:
- 14.1 - Caribou Lou
- See Also:
-
newCustomForm
Initiates a builder object to create a new Custom Form. The operation is finished with thecreate
method.Example:
def customForm = api.customFormApi() .newCustomForm() .setName("CustomForm01) .setLabel("my custom form 1") .setTypeId(1) .setAttributeValue("attribute1", "meatball01") .setAttributeExtensionValue("name", "value") .setUserGroupViewDetails("viewGroup") .setUserGroupEdit("groupEdit") .create()
- Returns:
- this builder instance
-
withId
Initiates an operation with an existing Custom Form by id. Please note that this is a numeric, database id, not a typedId. This is because this API is exclusively for Custom Forms only, so no other objects can be used, and no distinction on the type is then necessary.- Parameters:
id
- The database id of an already existing Custom Form- Returns:
- an Operations' builder instance
- See Also:
-