Class CustomFormApi.RecalculateApi

Object
RecalculateApi
Enclosing class:
CustomFormApi

public static class CustomFormApi.RecalculateApi extends Object
Helper class to recalculate Custom Forms. The custom form is recalculated in the database by invoking the method doRecalculate.

Note: no permissions are checked when recalculating the custom form.

Example:

 api.customFormApi()
     .withId(customForm.id)
     .recalculation()
     .doRecalculate()
 
See Also:
  • Constructor Details

    • RecalculateApi

      public RecalculateApi(FormulaEngineContext formulaEngineContext, Long id, CustomFormService customFormService, CustomFormServiceProperties properties)
  • Method Details

    • doRecalculate

      public Object doRecalculate() throws XExpression
      Finishes the recalculation operation. When doRecalculate() is executed, the Custom Form will be updated in the database.

      Note: Since 12.0.0, this operation only works in contexts that allow object modification. The previous behaviour can still be achieved by using the 'customFormApiAlwaysAllowsObjectModification' application property.

      Returns:
      an Object containing the data of the updated Custom Form or null if failed
      Throws:
      XExpression - if the custom form was not found or recalculation not allowed
      See Also: