How to Invoke Form Data Model Service Using Custom JS in AEM Cloud Core Component Adaptive Forms? | Community
Skip to main content
codingStar
Level 3
January 21, 2026
Solved

How to Invoke Form Data Model Service Using Custom JS in AEM Cloud Core Component Adaptive Forms?

  • January 21, 2026
  • 1 reply
  • 51 views

Hi,

I am using AEM as a cloud core component based adaptive form and want API to invoke form data model service from using custom javascript rule editor function.I am referring 

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/forms/adaptive-forms-authoring/authoring-adaptive-forms-core-components/create-an-adaptive-form-on-forms-cs/rule-editor-core-components/invoke-service-enhancements-rule-editor

But I have not found any topics for API to invoke form data model service from using custom javascript rule editor function.

 

there are some document form AEM6.5 like : https://experienceleague.adobe.com/en/docs/experience-manager-65/content/forms/adaptive-forms-advanced-authoring/invoke-form-data-model-services

 

But want to do in AEM as a cloud core component based adaptive form not found any document for the same.

 

Kindly share if there is any available API to invoke form data model service from using custom javascript rule editor function

 

/**
* CallApiOnButtonClick
* @name CallApiOnButtonClick
* @param {object} field
*/
function CallApiOnButtonClick(field) {
// 1. code to invoke form data model service
// business logic based on response
// 2. update form fields
}

 

Best answer by Pranay_M

Hi ​@codingStar

Thanks for clarifying the use case.

In Core Component–based Adaptive Forms on AEM as a Cloud Service, the Invoke Service action in the Visual Rule Editor currently supports direct field-to-parameter mapping only. It does not allow you to plug in a custom function inline to transform values at the moment you map them to FDM inputs. This is a known limitation of the current UI/feature set and is not configurable via a documented JS API.

What you can do today (supported pattern):

  1. Use a separate rule + custom function to “pre-process” your raw field values into one or more helper fields (hidden or read-only).
  2. In the Invoke Service configuration, map the FDM input parameters to these processed helper fields, not to the original fields.
  3. Use success/failure handlers and custom functions for any post-processing of the response.

Custom functions are supported and can be attached to rules as actions, but they cannot be injected as inline transformers inside the Invoke Service field mappings themselves. For reference, see:

Thanks
Pranay

1 reply

Adobe Employee
January 22, 2026

Hi ​@codingStar,

For Adaptive Forms based on Core Components on AEM as a Cloud Service, there is no separate low‑level JavaScript API (like guidelib.dataIntegrationUtils.executeOperation from AEM 6.5) documented for invoking Form Data Model (FDM) services directly from custom JavaScript in the Rule Editor.

Instead, FDM services are meant to be invoked via:

  1. The Visual Rule Editor’s “Invoke Service” action, which lists FDM services and lets you map input/output parameters and configure success/failure handlers.
    – See: “Invoke Service enhancements in the Visual Rule Editor for forms based on Core Components”
    https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/forms/adaptive-forms-authoring/authoring-adaptive-forms-core-components/create-an-adaptive-form-on-forms-cs/rule-editor-core-components/invoke-service-enhancements-rule-editor

  2. Custom functions, which you register as clientlibs and then call from rules, but these still rely on the platform’s built‑in Invoke Service behavior rather than a public JS FDM‑execution API.
    – See: “Create a Custom Function for an Adaptive Form based on Core Components”
    https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/forms/adaptive-forms-authoring/authoring-adaptive-forms-core-components/create-an-adaptive-form-on-forms-cs/create-and-use-custom-function-core-component/custom-function-core-component-create-function

If your requirement is specifically to call an FDM service purely from custom JavaScript (outside the supported Invoke Service and custom‑function pattern), this is not currently exposed as a documented, supported API in AEM as a Cloud Service for Core Component–based Adaptive Forms.

Please let us know your exact use case (validation, lookup, complex orchestration, etc.), and we can suggest a recommended pattern using Invoke Service + custom functions within the Rule Editor.

Thanks
Pranay

codingStar
Level 3
January 22, 2026
@Pranay_M The Visual Code Editor Invoke Services does not allow me to call custom functions to modify form field data.
My use case is that, while calling the Invoke Services component and picking data from form fields, I would like to modify or polish the field values just before handing them over to the FDM.
Pranay_MAdobe EmployeeAccepted solution
Adobe Employee
January 23, 2026

Hi ​@codingStar

Thanks for clarifying the use case.

In Core Component–based Adaptive Forms on AEM as a Cloud Service, the Invoke Service action in the Visual Rule Editor currently supports direct field-to-parameter mapping only. It does not allow you to plug in a custom function inline to transform values at the moment you map them to FDM inputs. This is a known limitation of the current UI/feature set and is not configurable via a documented JS API.

What you can do today (supported pattern):

  1. Use a separate rule + custom function to “pre-process” your raw field values into one or more helper fields (hidden or read-only).
  2. In the Invoke Service configuration, map the FDM input parameters to these processed helper fields, not to the original fields.
  3. Use success/failure handlers and custom functions for any post-processing of the response.

Custom functions are supported and can be attached to rules as actions, but they cannot be injected as inline transformers inside the Invoke Service field mappings themselves. For reference, see:

Thanks
Pranay