Call Application Link
Syntax
![]()
Command
Mandatory parameter Optional parameter Mandatory keyword Optional keyword |
CALL (<Destination> , <Form> , <Buffer>, <Status>, <Time-out>)
Description
Sends a transaction to a form in an external application that is linked to the form or report in which the call statement resides by a defined Application Link.
Diagram
Returned value type
None
Parameters
Parameter | Description |
<Destination> | Expression giving the name or Alias of an external LION application. |
<Form> | Expression giving the name of a form in the external application. |
<Buffer> | Name of a defined Application Link buffer. |
<Status> | Contains the status of the CALL action. This value is also stored (temporary) in the system item GETLASTRESULT. |
<Timeout> | Maximum time to wait on a connection to the designation, measured in seconds. |
Instead of the application name, an Alias can also be used.
Remarks
By default, an Applink continues using the already established database connection. Therefore, a commit inside the logic of an Applink call will also affect the calling object. Through the use of Aliases, it is possible to use an Applink with a new database connection by enabling the New Connection setting in the Control Center (see Aliases). The Alias name needs to be used instead of the application name in the CALL.
The Application Link buffer is used to send and receive data to/from the form of the external application. In the buffer all the controls of the form will be accessible in the form
<buffer>.<control> as shown in the example below.
When using multiple copies of the same application (e.g. from using the Application Installer) as
destination for application link calls, you can only use a single application link in the
calling application without the use of the 'remote call' option via an Alias. |
Example
var
applinkstatus : string
listno : numeric 2
item : alpha 100
begin_routine
with customer_management_customer
.cust_no := 1
loop for listno := 1 to 10
.button_action := 'I'
call ('customer_managment', 'customer', customer_management_customer, applinkstatus, 180)
if applinkstatus = ''
if .cust_no <> 0
item := '|' + .cust_no + '|' + .firstname + ' ' + .lastname + ' ' + .city + ' ' + .tel_no
fillbox ('APPLINK_DEMO.Customer', item)
endif
else
break
endif
.cust_no := .cust_no + 1
endloop
endwith
end_routine