Multi-tenancy and createOptionForm on Select, Field 'company_id' doesn't have a default value
I have a resource that takes Contacts as a Select options. I want to add a Create form to the Select to create a new Contact but when saving get the following error:
The
SQLSTATE[HY000]: General error: 1364 Field 'company_id' doesn't have a default valueThe
ContactResource form works when used standalone from the menu, but does not when used as the createOptionFormSolution
Here’s now to do it for anyone finding this:
createOptionAction() is where you need to pass in your additional data