Hi Thomas,
Thomas Holste (8/17/2012)
I wonder if I have understood the conceot of the childformdialog. I use use them when I call forms to edit daa, which is presented on a parent form in some kind of "gridmode". The user selects a record and then edits it.As Trent says
You can still call it from many different places.
. As all SF controls, they have a specific purpose, but they are also design to be used in many scenarios, same with the Business Objects, ChildFormDialogs are awesome and flexible, you don't have to use it just to modify a single record, you can do whatever you want, ex: I have cases where I need to modify a child record from different parents in different forms and different child BO, so I do the following:
- Create a form form with a Themed Panel
- Drop an instance of each child BO, ex BO1, BO2, BO3
- Add a Panel Page per each child BO I want to modify and add my controls as usual.
- In the constructor create a parameter based on a public enumeration that will control which page to activate.
- Override the Onload as suggested by Trent and then set the PanelManager's ActivePage based on the enumeration value, also set the form's PrimaryBusinessObject to the BO you want to work with.
- In the Parent forms, add a ChildFormDialog, select your form and most important, create a translation for the child BO you will be using. Add a parameter based on the public enumeration in step 4 and you are done!
Again, these are just steps from my mind, so they may not be all needed, but bottom line is to show you that with SF you can think out of the box and be very creative. I do sort of the same thing with the ListView automations to handle the Add process and instead of showing a child form, I do other stuff.
Edhy Rijo