Skip to main content
Solved

Get recordId of field when press a fiedl button

  • May 26, 2021
  • 3 replies
  • 101 views

Forum|alt.badge.img+1

i have a button field that run a script, i need to get tha field id(recordId) after press the button in the script, in some examples they recommend to use recordAsync(), but i have to chose the record, and i need to get it after press the button

Best answer by crmepacolombia

Thanks, i finally found the solution, if you need to get the record Id of the field after press a field button use this.

let tableClientes = base.getTable("Clientes");
let record = await input.recordAsync('',tableClientes).catch()
console.log(record.id, record.name);

3 replies

Forum|alt.badge.img+1
  • Author
  • New Participant
  • Answer
  • May 26, 2021

Thanks, i finally found the solution, if you need to get the record Id of the field after press a field button use this.

let tableClientes = base.getTable("Clientes");
let record = await input.recordAsync('',tableClientes).catch()
console.log(record.id, record.name);


Forum|alt.badge.img+3
  • New Participant
  • March 20, 2024

Thanks, i finally found the solution, if you need to get the record Id of the field after press a field button use this.

let tableClientes = base.getTable("Clientes");
let record = await input.recordAsync('',tableClientes).catch()
console.log(record.id, record.name);


HERO WITHOUT A CAPE. 
Worked, thanks


Forum|alt.badge.img+5
  • Participating Frequently
  • July 31, 2024

Why is this not in the documentation! @support12 please fix this