Thursday, September 3, 2015

SharePoint The data source control failed to execute the insert command


Recently I had migrated my list and its contents using ShareGate from Prod site to Dev site. There were some warnings and errors, but I chose to ignore them thinking that there may be related to users not being found on the dev environment. Creating a new item in that list gave the following error.

The data source control failed to execute the insert command. f8722a9d-2ff6-0080-1d51-17e445d41d9e


The list contained 2 lookup columns, one of them was a self-lookup. If I had paid attention to the error report, I would have spotted this error:
"The lookup column cannot be copied because the list '' is not in a parent site or in the same site as the column.". 
This was because the lookup column could not be created, as the list was not there. I created the lookup column and the new item creation worked as expected.

First look for any missing columns in the list if this error occurs, before looking for other solutions.