Skip to main content
January 14, 2026
Question

How to Save Record Data IDs from a!gridField a!recordData Without Selection or a!queryRecordType()

  • January 14, 2026
  • 4 replies
  • 0 views

Hello. I have a read-only grid that displays permissions data using a!recordData() as the data source. Currently, I can only capture the record IDs when users manually select rows in the grid using the selectionSaveInto parameter.

My Goal:
I want to automatically save all the record IDs returned by the a!recordData() query without requiring user selection and without using a!queryRecordType() in a separate expression or local variable.

Current Implementation:

a!gridField(
  label: "Permissions to Transfer:",
  instructions: "A temporary access group will be created to grant the selected permissions from the source employee to the destination employee.",
  helpTooltip: "Permissions that would generate risk combination or already belong to the Destination Employee have been hidden",
  labelPosition: "ABOVE",
  data: a!recordData(
    recordType: 'recordType!{57571bf8-20a7-4874-ac82-7f586277be58}GDA Permissao Acesso',
    filters: rule!GDA_QueryFilter_BuscarPermissoesPorAreaOuColaborador(
      idColaborador: ri!data.idColaboradorOrigem,
      idPermissoesOmitidas: a!flatten({
        local!idsPermissoesColaboradoresJaPossuem,
        local!idsPermissoesToxicas
      }),
      moduloFuncionalidadePermissaoIdValues: a!flatten({
        local!idValuesPermissoesDestinoJaPossui,
        local!idValuesPermissoesToxicasComDestino
      })
    )
  ),
  columns: {
    a!gridColumn(
      label: "Module - Functionality - Permission",
      sortField: 'recordType!{57571bf8-20a7-4874-ac82-7f586277be58}GDA Permissao Acesso.relationships.{c489989c-3175-42e4-9d14-3d0d8a394dec}funcionalidade.fields.{bd31af22-64ea-49a7-918c-04a269b09261}moduleId',
      value: a!defaultValue(
        fv!row['recordType!{57571bf8-20a7-4874-ac82-7f586277be58}GDA Permissao Acesso.fields.{f62ba409-1519-4117-befd-631ee260a10b}moduloFuncionalidadePermissaoText'],
        "â`“"
      )
    )
  },
  selectionSaveInto: {
    a!save(ri!data.selecaoPermissoes, fv!selectedRows)
  },
  showSearchBox: false,
  showRefreshButton: false,
  showWhen: and(
    not(local!origemNaoPossuiPermissoes),
    a!isNotNullOrEmpty(ri!data.idColaboradorOrigem),
    a!isNotNullOrEmpty(ri!data.idColaboradorDestino)
  )
)

What I'm Looking For:

  • A way to dynamically capture all record identifiers from the a!recordData() query result directly within the a!gridField() configuration
  • Avoid duplicating the query logic with a!queryRecordType() in a separate local variable
  • Ideally leverage grid function variables like fv!currentPage or similar mechanisms to access the underlying data identifiers
  • A more dynamic approach that doesn't require explicit column selection or user interaction

Questions:

  1. Is there a way to access the complete dataset or identifiers from a!recordData() within the grid configuration itself?
  2. Can I use parameters like pagingSaveInto or validations with fv!currentPage to extract IDs automatically?
  3. Are there any undocumented function variables or techniques that would allow me to capture all returned record IDs without selection?
  4. Would using refreshOnVarChange combined with a specific save pattern help achieve this?

I understand that using a!queryRecordType() in a local variable is the standard approach, but I'm exploring if there's a more integrated solution within the grid component itself to avoid query duplication and improve performance.

Any insights or creative solutions would be greatly appreciated!

Thank you all for your help!

4 replies

harshas2775
January 15, 2026

Without any user action, like paging changes or selection, there is no way to store all the ids to the grid on load. So you will have to use either pagingsaveInto (which will save only when user changes the page of grid) or selection save into (which saves on selection of row). 

January 15, 2026

This doesn't work for me, I need to be instantly. But I appreciate it anyways.

BTW how to properly replace a!recordData by a a!queryRecordType? Speally on the grid and the records are above the amount of 5K, how to make the variables deal with the next batch?

Supposing e.g we have 15,000 records. 

January 15, 2026

Because the main utility of a a!ecordData is that it deals with it for you, what if beyond a a!recordData I need a a!queryRecord to work accordingly with my a!recordData query?

shubhama926776
January 15, 2026

No direct way in a!gridField to auto-save all a!recordData record Ids without selection or duplicating query in local var.
There is no workaround using pagingSaveInto, fv!currentPage, or hidden grid features to automatically capture IDs from a!recordData()