Announcement

Collapse
No announcement yet.

Changing Connection in the "AfterInsert" function of a form

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing Connection in the "AfterInsert" function of a form

    I have multiple connections. I have a form which is assigned to connection1, once this forms data has been validated and has updated the initial table, I need to lookup and update other tables in connection2.

    Since sc_change_connection("Old_Connection", "New_Connection") only works in Form when applied in
    onLoad
    onLoadRecord
    onScriptInit

    How would I get the value of a field from another connection other than that of the one assigned to the form?
    I am ideally trying to keep this all in one form as apposed to calling a "Blank" form, having to pass dozens of parameters.

  • #2
    Larry,

    This always works:

    sc_lookup(xyz,"SELECT...","connection");

    Third parameter is the connection to use.

    Dave
    Dave Prue
    Code Whisperer
    Lahar International Corp
    www.lahar.net

    Comment


    • #3
      Thanks Dave, Huge help

      Comment


      • #4
        Closed as solved
        /Giuseppe

        Professional Scriptcase Services
        Some Customers opinions

        Comment

        Working...
        X