Editing secondary BO on form Enables Save/undo on maintenance toolstrip


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I have a form that has two BOs on it. One is a parent, the other is a child, however I've turned this off (the child BO's parent BO property is cleared and I've also set the filter child records property to off on the parent).



I have a maintenance toolstrip for the primary BO and a set of buttons to manage the editing of the secondary bo. The maintenace toolstrip works as expected when I use it. However, whenever I edit the secondary bo via the Edit method, the Save and undo buttons become enabled on the maintenance tool strip, the edit,new and remove are still enabled and the primary 2data isn't editable. When I undo or save the secondary bo, again the save/undo buttons on the maintenance toolstrip are disabled.



Any Ideas as to whats wrong here?
Replies
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
The strange functionality is tied to the IncludeInForm settings.  By default, all business objects are included in a from Save(), but only the primary business object is included in anything else (Edit(), Add(), Undo(), etc.).  So, when you call Edit() on the secondary BO, the form is watching it because it is included in a form Save(), and when it becomes dirty (because you called Edit() on it), the Save button becomes enabled.  But, since only the primary business object is included in the undo, the undo button does not become enabled.  To have the MaintenanceFormToolstrip completely handle the parent BO and completely ignore the child BO, you will need to set the form's IncludeInFormSave property to PrimaryBusinessObject.  Then, the MFTS will handle the primary BO and your buttons will handle the child BO.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Ah...thanks. I've seen that IncludeInForm property mentioned before, but it obviously didn't sink in.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search