Master Details Forms Problem

Hello,

I got very weird requirement from my client and as I am using SC’s master and details form for that, I am getting problem.

I have two table in database which are in master-details relationship. As long as master table does not have a entry saved, we cannot enter and save data in details table related because detail table’s required foreign key does not exists. Master table is products and details are different packages of that product. As long as I don’t save product’s details, we (SC) cannot load form to enter and save package details of that product because foreign key of details for product does not exist.

Requirement: When user click add new product, a form should load which should display fields to enter product details and package details and on single click everything must save.

Problems:

  • I created master form for products and a details form for packages and linked with foreign key. When I run application, new form opens and displays only master form, details form does not display. [U]The client thinks there is no place to enter packages and client is not liking this UI[/U].
  • Second, we need to save product(1) then displays details form. And then need to click add button(2) on details form to load a form to enter packages. After adding packages, again need to click save button(3) to save that packages. Another field set loads, again after adding packages need to click save button(4) to save second package. And so on. Client asks, "[U]I want a single 'save' button to save entire thing. We don't want more clicks.[/U]"

Is there any solution for that? Should I use temporary data save in database? How?

Thank you.


Milind

That’s the way SC works!
A solution for that can be an empty field filled with an alert message like “You have to insert product before adding details” that inform the user. You can choose to display only in “New Record” mode ( use sc_btn_new / sc_btn_insert for that ).
For the second problem i suggest to use a form in “Multiple rows” mode so you can add more rows and confirm once.
Hope this help