Skip to main content
Solved

Identify the record associated to a button used to open a custom extension

  • August 3, 2022
  • 3 replies
  • 40 views

  • New Participant
  • 2 replies

Hello,

I’m trying to develop a custom extension, but I’m facing an issue.
I’ve defined a button associated with action “Open Custom Extension” that points to my custom extension.
However in both case, I’m unable to retrieve the recordId of the line of the clicked button:

  • When extension panel is closed
  • When extension panel is opened

I’m trying to retrieve the “selectedRecordIds” but upon a button click, it remains empty…
Is it possible to retrieve this?
Is it possible for the custom extension, that the source event is a click on a button?

Thanks,
Raphael

Best answer by kuovonne

Hello @kuovonne, thank you for the quick answer.

If I understand the documentation well, it’s not possible to test the button in development mode but only when the app is released.
To test the useRecordActionData hook in a development mode, the Perform record action within the Advanced panel.
So the button actually fires no trigger in development mode, is that correct?

Thanks,
Raphael


Correct. I usually create a formula field in the table that generates the record action data so that I can copy/paste the value into the Advanced panel for testing.

3 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • 6009 replies
  • August 3, 2022

Welcome to the Airtable community.

You can get the triggering button using the recordActionData. This is different from the selectedRecordIds.


  • Author
  • New Participant
  • 2 replies
  • August 4, 2022

Welcome to the Airtable community.

You can get the triggering button using the recordActionData. This is different from the selectedRecordIds.


Hello @kuovonne, thank you for the quick answer.

If I understand the documentation well, it’s not possible to test the button in development mode but only when the app is released.
To test the useRecordActionData hook in a development mode, the Perform record action within the Advanced panel.
So the button actually fires no trigger in development mode, is that correct?

Thanks,
Raphael


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • 6009 replies
  • Answer
  • August 4, 2022

Hello @kuovonne, thank you for the quick answer.

If I understand the documentation well, it’s not possible to test the button in development mode but only when the app is released.
To test the useRecordActionData hook in a development mode, the Perform record action within the Advanced panel.
So the button actually fires no trigger in development mode, is that correct?

Thanks,
Raphael


Correct. I usually create a formula field in the table that generates the record action data so that I can copy/paste the value into the Advanced panel for testing.