BusinessListBase list items issue - "List item must be marked as a child object"

BusinessListBase list items issue - "List item must be marked as a child object"

Old forum URL: forums.lhotka.net/forums/t/10076.aspx


Gort posted on Tuesday, February 15, 2011

I have a BusinessListBase object and that I am trying to add a new list item to and am getting the error "List item must be marked as a child object". 

Code:

var item = myList.AddNew();

Do all items in a BusinessListBase object need to be marked as children?  My list object is not a child object so why does it require all of its items to be children?

Confused.

Tks for any assistance.

WillWayne replied on Tuesday, February 15, 2011

For a collection of Root items, try using the DynamicListBase<T>

JonnyBee replied on Tuesday, February 15, 2011

BusinessListBase reuires that the items in the list are child object of the BLB.

Your BLB may be a root or child -  but all items in the list must be child objects and cannot be saved in their own "context". They can only be saved as part of save on the "root" object of the structure.

 

Gort replied on Tuesday, February 15, 2011

Ok.  It seemed like that was the case but just wanted someone to confirm this.

Tks.

Copyright (c) Marimer LLC