StandardForm and BO IncludeInFormEdit


Author
Message
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
I have two BOs on a form,  B1 and B2.  B1 is the primary BO of the form, I have set the IncludeInFormEdit to TRUE on B2.  When I call this.Edit() only the fields that are bound to B1 go into edit mode, B2 fields only go into edit mode if I directly call the Edit method of B2.  Am I missing something here?

Also if I change the data in one of the field and then use the BrowseDialog to select a new record there is no message to save the changes before switching records.  What method must I call so that the user will be prompted to save any changed data?  If you close the form without saving any changes the user is automatically prompted, I want to duplicate this beheavior.  Should I just check the isDirty property of the BO and prompt with my own message?

Reply
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
As for the second question, you'll need to do wht you said, and test the IsDirty() property of the business object before you show the BrowseDialog.

The best thing would probably be to go through the business objects in the Form.GetListOfSaveBOs(), which will return an array of the business objects that will be included in the save. If any of them are dirty, then show the message and handle the logic accordingly.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search