Hi there,
I have read through numerous threads and I know that this problem is occurring because we return Id not id as an element in our api and that I need to change it to id through the code
{"Id":1,"Portfolio":null,"Code":"Dep","Active":true,"ParentCompany":0,"CompanyName":"Deputy Zapier QA","TradingName":"","BusinessNumber":"","CompanyNumber":"123 123 123","IsWorkplace":true,"IsPayrollEntity":true,"PayrollExportCode":"","Address":157,"}
I have tried to do this but no matter how many different ways of bashing my head against the metaphorical wall i cannot get it to work. Sample code below
const getList = (z, bundle) => {
const promise = z.request({
url: `https://${bundle.authData.endpoint}/api/v1/resource/Company/QUERY`,
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: '',
});
return promise.then((response) => {
const results = response.json;
return results.map((item) =>{
results.id = results.Id;
return item;
});
});
}
Please tell me what i need to modify to get this working because I have tried almost everything in many different ways and have read numerous threads. Thanks in advance.