Announcement

Collapse
No announcement yet.

[SOLVED] open form to new record

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] open form to new record

    How does one open a form to new record (rather than first record in record set)?

    I have a grid with several orders. The order ID (in the grid) has a linked field to the orderDetail form. Currently the default SC settings are when the link is clicked to open the form, the form is opened and the first record in the recordset is displayed.

    I would like to open a form (using the modal window option) to add new record (order detail).

    Thank You!

  • #2
    This is what I have done to "force it"; in the SQL if you have primary key like id put where id < 0

    this always open up in insert mode

    Comment


    • #3
      This is the best way: sc_apl_conf("Application", "Property", "Value"):

      Ex. 1: Forces the "my_form" application to start in the addition mode.
      sc_apl_conf("my_form", "start", "new");

      see helpfile for further explanation. Put this tiny macro in your init event.
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #4
        Thank you for the help!!
        @aducom = solution worked!

        Comment


        • #5
          Originally posted by find1001 View Post
          This is what I have done to "force it"; in the SQL if you have primary key like id put where id < 0

          this always open up in insert mode

          if you are using grid_edit_view in the associated form like invoice, than its not working at all, because as long you save the record, it will not display the saved record, and goes again on New Blank Record and you can't see the grid_edit_view for invoice items.

          hope you understand.
          Website Design

          Comment

          Working...
          X