Is selectRecordsAsync Deprecated in automations script?

Hi

This has worked for me for over 18 months and now it fails. The code is within an automation script block. The code window shows a strikethrough line in “selectRecordsAsync” and the tip suggests this method is deprecated.

Any ideas why and what alternative I have please?

let mgl_allocationsBase = base.getTable(“allocations”);
const mgl_allocationsBaseRecords = await mgl_allocationsBase. selectRecordsAsync();

Thanks

Claire

Hi @Claire_Conza - if you scroll down a bit further on the pop-up you will see the deprecation notice:

So your script will continue to work for now, but will fail at some point in the future. You can future proof it now by passing in the fields you need:

let table = base.getTable('Table 1');
let result = await table.selectRecordsAsync({fields: ['Name', 'Notes']});

Have a look at this post too, which passes all fields easily:

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.