Skip to main content

When trying to add a new row to a model I get a missing Parent ID error. Other rows in the model are rendering correctly because of a filter on the parentID

If the parent field is required,  you need to make sure it is being populated when you create a new record.  Just the fact that you have created a filter on existing records does not necessarily mean that the parent id will be populated in the new record. 

So you have a few options. 

1. Include the ParentId field in your table - forcing the user to put the parentId into the new record. 
2. Ensure the ParentId field is one of your conditions.  (This should be ParentID, not Parent.ID) 

Sometimes I create 2 conditions - on on ParentId and another on Parent.name - in order to ensure that both are available in the new record. 

Hope this helps. 


Reply