(((Detail is not shown until you save your Master form.???))))

hi

(((Detail is not show until i save Master form.???))))

how i can let details show and save master / detail in same time
because i need to build invoice

customer details then items details

thank you

I did the same objections a few days ago (August 1!) And there seems to be no solution as well as structured.
(http://www.scriptcase.net/forum/forum/scriptcase-8/discussion-aa/70322-master-detail-single-button-for-the-update)
To carry on the work I leave the master-detail as well as sc allows, but I already know that’s not good!
The primary solution would be a button that saves everything: master and detail.
I’m thinking of working with temporary tables and handle onload and oninsert and OnUpdate, it would be laborious, but it reaches the end.
Another solution, probably the one that I will adopt, is to arrange a separate entries with buttons that have the switch function:

  • Master form with buttons ‘forward’ -> detail form with button ‘forward’ -> end / closing document, etc …
    In my case I have some other form then it would be useful to this solution.
    If you find the best ideas … let us know!
    Hello
    Enrico

I’ve had serious concerns with Master-Detail myself.

2 issues have been articulated:

a) getting both master and detail to show at once
b) clicking one button to update both master and detail

Architecturally, SC form apps are independent PHP (server-side technology) apps tightly coupled to CRUD logic of their designated table. To compensate, SC internally invokes the detail app when it has the foreign key from the master app. So until you have created the master record (with a round trip to the server), it doesn’t do this (except you wish to fiddle with the generated end-code, inclusive of interactions with frames).

For these things to happen seamlessly, NetMake would need to create a front-end HTML component for Master-Detail that allows you edit the full master/ detail, then commit all back to the server in one fell swoop. This would be far more responsive to users than today where each detail record action causes a trip to the server.

In the meantime you can manage what SC has by:

  • Hiding the default “Update” button on the master and adding a “Edit Header Details” with a tooltip so the user knows the button has nothing to do with the details section; this should sc_redir to same app in update mode
  • Use sc_master_value to update any fields in the master section that depend on the details section, once a detail line item is created/ deleted/ modified.

In my experience, there is never a need for the user to click update in 2 places. But indeed the default master-detail presentation of SC is confusing so users will probably click twice.

Alternatively you can use a blank app and put in your own master-detail presentation and business logic giving you full control to achieve both objectives. Of course this means losing the RAD benefit of SC in some respects and styling differences from other parts of your app, except you take the time to use SC’s CSS.