function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jennifer MichaelJennifer Michael 

Attempting to Create a Custom Object in a Flow

I am attempting to create a custom object within a flow.  When I run it I receive the following error

"An error occurred at element Create_RMG_RMA_Number (FlowRecordCreate).
INSERT --- INSERT FAILED --- ERRORS : (INVALID_ID_FIELD) Record ID: id value of incorrect type:"

I am able to create a standard object (account) without receiving this error.  Any guidance would be helpful.
Brian Cherry FWIBrian Cherry FWI
I'm guessing you are trying to set the ID of a created record which you can't do... Or you have a lookup field you are trying to populate with an another object ID
Jennifer MichaelJennifer Michael
Thanks for the response. I am not trying to set the ID, I am trying to create a custom object that contains an autonumber field. Here is a screen shot of the flow - record create: [cid:image003.jpg@01D22AA6.C08009C0] Here is a screen shot of the custom object - client number: [cid:image004.jpg@01D22AA6.C08009C0] Again, thanks for any assistance you can give. ​
Brian Cherry FWIBrian Cherry FWI
Hey Jennifer,

For some reason the images aren't showing up. You can email me at and I'll be happy to provide some additional guidance.
Kevin DillonKevin Dillon
Hi. Was a solution found for this issue? I'm running into the same problem and am not sure what's causing the issue. Thanks.
Kevin DillonKevin Dillon
After further inverstigation, it looks like this may just be a poorly written error message. I noticed in my flow that I had not set the OwnerId on the record I was creating. Once I added a mapping for this into the flow on the crecord creation step, I no longer hit the error message.
Rick UptonRick Upton
Kevin, thanks for posting the solution! For those who next need to know how to set the OwnerId to the user that kicked off a screen flow, see Flows and current user ( (that was the next solution I needed after I found this solution).