Interface CustomFormApi
public interface CustomFormApi
Utility class to work with Custom Forms in Groovy code
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceHelper class to create Custom Forms.static interfaceHelper class to work with Custom Forms statuses.static interfaceHelper class for all operations on Custom Forms.
Example:static interfaceHelper class to recalculate Custom Forms.static interfaceHelper class to update Custom Forms.static interfaceHelper class to work with Workflow statuses. -
Method Summary
Modifier and TypeMethodDescriptionList<?> Fetch CustomForms which are created with the embedded CustomFormType.
Example:Fetch parent object from the child CustomForm's object level (if built with the embedded CustomFormType).
Example:Initiates a builder object to create a new Custom Form.Initiates an operation with an existing Custom Form by id.
-
Method Details
-
fetchCurrentItemEmbeddedCustomForms
List<?> fetchCurrentItemEmbeddedCustomForms()Fetch CustomForms which are created with the embedded CustomFormType.
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 CustomForms child
- Since:
- 14.1 - Caribou Lou
- See Also:
-
fetchCurrentItemParent
Object fetchCurrentItemParent()Fetch parent object from the child CustomForm's object level (if built with the embedded CustomFormType).
Example:
return api.customFormApi().fetchCurrentItemParent()- Returns:
- Parent object, ex. standalone CustomForm
- Since:
- 14.1 - Caribou Lou
- See Also:
-
newCustomForm
CustomFormApi.CustomFormBuilder newCustomForm()Initiates a builder object to create a new Custom Form. The operation is finished with thecreatemethod.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:
-