|
This macro is used to redirect the processing application to other applications or a URL.
If the redirect uses parameters, these must be passed in the following format: 1) After the name of the application, use the comma delimiter (,) then 2) = (equal sign) . 3) More than one parameter must be separated by a semicolon (;) 4) The target determines which application is opened (default=_self): _self, _parent, _blank, or modal. 5) Optional parameter to set error messages redirection in the application: "F" redirects if there is an error in the application (default value) and "E" does not redirect.
OBS. If your connection uses transaction control the use of this macro on the events onAfterInsert, onafterupdate, onAfterDelete, onBeforeInsert, onbeforeupdate or onBeforeDelete should come after the use of macro sc_commit_trans so this way it will save the form changes.
This macro does not support the use of the Modal parameter when used in a Run button.
Ex. 1: Application without parameters nor target. if ([global_user] == "test") { sc_redir(application_x); }
Ex. 2: Application with parameters and without target. if ([global_user] == "test") { sc_redir(application_x, parm1={var_test}; parm2="xxx"); }
Ex. 3: Application without parameters and with target. if ([global_user] == "test") { sc_redir(application_x, "", "_parent"); }
Ex. 4: Application with parameter and target. if ([global_user] == "test") { sc_redir(application_x, parm1={var_test}; parm2="xxx", "_blank"); }
Ex. 5: URL. if ([global_user] == "test") { sc_redir(http://www.my_page.com); }
�
OBS. Everything that was passed as parameters to the called application will be available as global variable.
EX: sc_redir(employee, parm1={var_test}; parm2="xxx", "_blank");
In the employee application the parameters will be accessible at [parm1] and [parm2]
|