as I understood you are trying to clone a record. From my perspective you have two problems: 1) the Xrm.WebApi retrieves also the formatted values and add some additional fields like the etag, I am not sure that just removing the id attribute (in your case salesorderdetailid) will be enough to create a valid object for the createRecord function 2) the salesorderdetail is a tricky entity, generally you need to pay more attention on the columns you are passing to create a record under this entity than another one (like a contact for example) however in your code you can avoid the filter, that is nice until someone else not understanding it checks your code and proceed with a standard creation and assignment, like let newRecord = {}; newRecord[“quantity”] = salesorderdetail[“quantity”[; etc etc, filling only the properties you need. if you want to copy all the properties regardless I suggest to switch to another way to retrieve the record (like fetchAPI) where you can disable by an header the return of formatted values and deal with less properties. hope it helps