Update custom field from Forge app

Hello, I added some custom fields in Jira Service Management and added them in a form to be displayed in a Customer Portal. Now, after a user fills the values for the custom fields when reporting an issue, I want to update the value for a specific custom field from my Forge app, but I obtain the following error: ‘This API works only with fields provided by Forge apps.’.

This is my code:

const response = await api.asApp().requestJira(route`/rest/api/2/app/field/value`, {
        method: 'POST',
        headers: {
          'Accept': 'application/json',
          'Content-Type': 'application/json'
        body: bodyData

And this is my manifest:

    - key: forge-web-trigger-hello-world-queue-page
      function: main
      title: Forge Web Trigger
    - key: main
      handler: index.run
    - key: cellfusion-development-webtrigger
      function: main
  id: ari:cloud:ecosystem::app/8344bad8-d8aa-4fc7-9c55-1818986913bd
    - 'write:jira-work'

I hope you can help me. Thank you!

I have tried something else. I created a custom field from my Forge application, and it was successfully created. Then, I added the field to a form in the Customer Portal, and reported an issue from there. Now, I am trying again to update the value for this custom field from my Forge app, but again, I get the same error, even if the field was created from Forge:

INFO 19:01:12.687 346049894d8448978f5fe0ed4f97fb2e {
errorMessages: [ ‘This API works only with fields provided by Forge apps.’ ],
errors: {}

Hey, @RigobertoRamosRobles,

This API works only for fields created with Forge modules:

I see how the documentation can be confusing, as it mentions fields added by an app, so one might think adding a field via the REST API counts. But no, it doesn’t, the intention was “added by apps through their manifest”. We will improve the wording there.