Parent/Child Maintenance Form Question


Author
Message
fparker
fparker
StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)
Group: Forum Members
Posts: 31, Visits: 199
Hello All,

I have a maintenance form with two business objects on it.  They are arranged in a parent/child relationship.  I also have some text boxes bound to each object on the form.  When the user hits the new button, I'd like a record to be created in both objects.  The primary key is not auto incremented on either object.  If I set the Form's IncludeInFormAddType property to AllBusinessObjects, I get a BusinessLayerException ("An error occurred while retrieving the primary key from the parent business object").  If I instead set the IncludeInFormAddType property back to PrimaryBusinessObject and put a call to the child object's Add() method in the handler for the parent object's AfterAddNew event, no exception will be raised and the child objects editing state will be Adding but the controls associated with the child object do not become enabled.  Is there a way to get this to work?  Thanks for your help.

Fran Parker

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