AFAS Remote command line actions

Overview of the actions you can perform from the command line using AFAS Remote.

Content

Description

You use a batch file to run the command line actions using AFAS Remote. The command line in the batch file has the following structure:

For example, the command line for running an UpdateConnector for AFAS Online is recorded as follows:

afasremotecmd.exe /D"AOL" /G"12345.CONNECTOR" /W"586^&WWq" /O"O12345AA" /L"logfile.log" IMPORTXML /N"KnEmployee" /F"employee.xml" /L"employee.log"

Explanation of the options (see also the general explanation).

  • Environment
  • Command line action (here: IMPORTXML)
  • Additional options

    Mandatory and optional options for running a command line. This example includes two mandatory options: '/N' (the name of the UpdateConnector) and '/F' (the name of the XML file). The XML file must reside on the system on which you run AFAS Remote.

    The information for every command line action includes a description of the options.

Run a batch file

If you run a command line action on the local system (by starting the batch file), a connection with Profit is established via the Profit Webservices. The command line action is placed in the Profit queue as a task. The task is performed when it is its turn. When this task has been performed, this is reported back and the command line is closed. This report only refers to the task in the queue. View the log files for content-related information.

The batch file on the external system remains active until Profit reports back that the command has been executed. Then, the batch file is closed. Log files are always saved on the system on which you are running AFAS Remote.

App_AFAS Remote commandline uitvoeren (Beschr)

A command line is always run on a specific environment. You can only run a command line successfully if the following conditions are met:

  • The settings file contains a valid token of a command line user in the environment that you are calling from the command line.
  • The command line user is not blocked.
  • The AFAS Remote app connector is not blocked.
  • The AFAS Remote settings file contains a valid token of the command line user.

View the queue

You can view the queue by selecting General / Management / Queue.

When you perform a task, you see a reference code at the command line prompt. As of Update 2016.2.08 this code is also shown in General / Management / Queue. Create a new view and add the Task id field to this view.

Procedure