This is not a valid record ID. A record ID takes the form of rec
followed by 14 characters. To see actual record IDs, create a formula field with the function RECORD_ID()
.
This is not a valid record ID. A record ID takes the form of rec
followed by 14 characters. To see actual record IDs, create a formula field with the function RECORD_ID()
.
Thanks, yea shortly after posting this I figured that must be the case. Is there anyway to do something like this:
const lookupCreative = base("LookupCreative");
const ncreativeRecord] = await lookupCreative
.select({ filterByFormula: `Hash="${hash}"`, fields: d] })
.all();
We are currently moving a process that we wrote using the REST API, over to using a custom extension with scripting. And I currently have this:
const creativeRecord = await lookupCreative.selectRecordsAsync({
fields: d"Hash"],
});
But is there is any better way to get a record id based on if the hash of the record matches the hash we create in code?
Thanks, yea shortly after posting this I figured that must be the case. Is there anyway to do something like this:
const lookupCreative = base("LookupCreative");
const [creativeRecord] = await lookupCreative
.select({ filterByFormula: `Hash="${hash}"`, fields: [] })
.all();
We are currently moving a process that we wrote using the REST API, over to using a custom extension with scripting. And I currently have this:
const creativeRecord = await lookupCreative.selectRecordsAsync({
fields: ["Hash"],
});
But is there is any better way to get a record id based on if the hash of the record matches the hash we create in code?
The REST API / Web API has some significant differences from Custom Extensions.
On the other hand, retrieving and processing records in Custom Extensions is very similar to Scripting Extension. And Scripting Extension is much simpler to use than Custom Extensions.
I suggest that you look at the Scripting documentation and learn the methods and features (and lack of features) in Scripting before applying that logic to a Custom Extension.
For example, both Custom Extensions and scripting have these features
- no filter by formula; all filtering needs to be done in JavaScript after you get the records
- a “query result” object
- singular and batch methods for CRUD operations