May 01, 2022 11:19 AM
I am trying to use createrecordsasync but am getting this error: “No overload matches this call”
All the parameter types are correct. I’ve switched them, created variables, double checked, etc.
What else can I check?
No overload matches this call.
The last overload gave the following error.
Argument of type ‘{ Client: { id: string; }; Term: { id: string; }; Eating_Count: number; Eating_Nutrients: string; Nutrients_Eating_Ids: string; Type_Not_eating: string; Not_Eating_Count: number; Not_Eating_Nutrients: string; Not_Eating_Nutrients_IDs: string; }’ is not assignable to parameter of type ‘{ Name?: string | undefined; fld5FO4eGWlC7DMPI?: string | undefined; Note?: string | undefined; fldgbYNn7xXOXZ1Gy?: string | undefined; Term?: readonly { id: string; } | undefined; fldJxWEonOumMn0g3?: readonly { …; } | undefined; … 9 more …; fldZSv8PUr3LGCm1T?: string | undefined; }’.
Object literal may only specify known properties, and ‘Eating_Count’ does not exist in type ‘{ Name?: string | undefined; fld5FO4eGWlC7DMPI?: string | undefined; Note?: string | undefined; fldgbYNn7xXOXZ1Gy?: string | undefined; Term?: readonly { id: string; } | undefined; fldJxWEonOumMn0g3?: readonly { …; } | undefined; … 9 more …; fldZSv8PUr3LGCm1T?: string | undefined; }’.(2769)
env.14306.d.ts(35641, 5): The last overload is declared here.
(property) Eating_Count: number
May 01, 2022 11:33 AM
Updated all fields so it’s single line text and all inputs are strings. New error is:
Argument of type ‘{ Client: { id: string; }; Term: { id: string; }; Eating_Count: string; Eating_Nutrients: string; Nutrients_Eating_Ids: string; Type_Not_eating: string; Not_Eating_Count: string; Not_Eating_Nutrients: string; Not_Eating_Nutrients_IDs: string; }’ is not assignable to parameter of type ‘{ Name?: string | undefined; fld5FO4eGWlC7DMPI?: string | undefined; Type_Eating?: string | undefined; fldgbYNn7xXOXZ1Gy?: string | undefined; Term?: readonly { id: string; } | undefined; fldJxWEonOumMn0g3?: readonly { …; } | undefined; … 25 more …; fldgo1o4acyF69ouz?: string | undefined; }’.
Object literal may only specify known properties, but ‘Type_Not_eating’ does not exist in type ‘{ Name?: string | undefined; fld5FO4eGWlC7DMPI?: string | undefined; Type_Eating?: string | undefined; fldgbYNn7xXOXZ1Gy?: string | undefined; Term?: readonly { id: string; } | undefined; fldJxWEonOumMn0g3?: readonly { …; } | undefined; … 25 more …; fldgo1o4acyF69ouz?: string | undefined; }’. Did you mean to write ‘Type_Not_Eating’?(2345)
May 01, 2022 12:41 PM
There is probably something that isn’t quite right. Due to the lack of formatting in your post, it is too hard for me to read to troubleshoot.
I recommend doing a console.log of your array and going over everything with a fine tooth comb. You can also try cutting out different field values until you get to the one that is causing the issue. Or maybe the issue is that you don’t have a {fields: {…}}
property at the top level. Too hard to read as is to tell.
Apr 06, 2023 04:06 PM
Hi! I am trying to create some records and I am getting the same mistake. Have you maybe figured out what was causing the issue?