Help

Is selectRecordsAsync Deprecated in automations script?

1336 1
cancel
Showing results for 
Search instead for 
Did you mean: 

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();

image

image

Thanks

Claire

1 Reply 1

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

Screenshot 2021-09-16 at 11.16.51

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: