Skip to main content

Retrieve record name by it's id

  • December 3, 2021
  • 1 reply
  • 76 views

Andrey_Kovalev
Forum|alt.badge.img+20

Hello everyone!

Is it possible to retrieve the record name having it’s id without the need of requesting the whole table which contains this record? By other words, if I know there is an object {id: “something”, name: “something other”} and I can get it’s properties

let obj = {id: 1, name:"object name"};
console.log(obj.id, obj.name);

Can I make a reverse? Say, I know recordID, it has a unique value. Can I retrieve the name belonging to this recordID?

Thanks in advance.

1 reply

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • December 3, 2021

Scripting now lets you request a single record by id with selectRecordAsync (note the singular Record). See the documentation for details.