I get this error when I try to open the relationship field after I added data there programmatically.
Steps:
1. I added a new row to the array using dispatchField (Screenshot 1)
2. The ID is successfully passed to the row (Screenshot 2)
3. Payload successfully receives data by id (Screenshot 3)
4. I am trying to edit the relationship field manually and get an error Cast to ObjectId failed for value. I see that the id is not transmitted when the payload tries to load the data of other items (Screenshot 4)
5. This is what the relationship field looks like (Screenshot 5)
The problem was solved by switching to version 1.12.0 using a new method for working with arrays.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.