Announcement

Collapse
No announcement yet.

Webinar Macro sc_change_connection

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

  • Webinar Macro sc_change_connection

    Hello!

    Thanks for attending to our live webinar today! I hope that it was helpful for you.

    Please find below a link with the recorded video:

    http://bit.ly/sc_change_conn

    regards,

    Márcia Araújo
    Last edited by sales.scriptcase; 08-15-2014, 04:30 PM.

  • #2
    code used:

    ================================================== ==========================
    Example 1:
    EVENT: onValidateSuccess

    $field = {login};

    $sql = "select group_id from sec_users_groups where login = '" . $field . "'";
    sc_lookup(ds, $sql);

    if ({ds[0][0]} == 2)
    {
    sc_change_connection("conn_1", "conn_2");
    }
    elseif ({ds[0][0]} == 3)
    {
    sc_change_connection("conn_1", "conn_3");
    }

    ================================================== ===============

    Example 2:
    EVENT: onScriptinit

    if ({company} == 2)
    {
    sc_change_connection("conn_1", "conn_2");
    }
    elseif ({company} == 3)
    {
    sc_change_connection("conn_1", "conn_3");
    }

    Comment

    Working...
    X