6. Juni 2007 00:20
SalesHeader.RESET;
SalesHeader.SETRANGE("Document Type",SalesHeader."Document Type"::Order);
SalesHeader.SETRANGE("No.",'04200024');
IF SalesHeader.FIND('-') THEN
REPORT.RUN(50089,FALSE,FALSE,SalesHeader);
6. Juni 2007 08:13
IF SalesHeader.GET(SalesHeader."Document Type"::Order, '04200024') THEN
...
REPORT.RUN(50089,TRUE,FALSE,SalesHeader);
6. Juni 2007 08:32
C/SIDE Reference GuideNavision Application Server
No Graphical User Interface
As there is no graphical user interface (GUI) on Navision Application Server, there are some limitations on the C/AL code that can run on the application server. For more information on this, see the GUIALLOWED function.
The following functions are available when running Navision Application Server:
All system functions except for the GUI related functions, such as DIALOG and CONFIRM.
OCX and AUTOMATION functions.
CODEUNIT functions.
FILE functions.
The following functions are not available in Navision Application Server:
FORM functions.
REPORT functions.
Dataport functions.
Error Logging
When you run C/AL code with triggers containing functionality that invokes GUI, an error occurs. A corresponding error message is posted in the NT event log. For more information on message logging, see the manual Installation & System Management: Microsoft Business Solutions-Navision Application Server.
Calls to the following functions will create errors:
FORM, DIALOG and CONFIRM: an error is shown on screen when the application server runs from the Microsoft DOS command line. When Navision Application Server runs as a service, an error message is logged.
MESSAGE and ERROR: an error message is logged.
ATTENTION
REPORT and DATAPORT functions are not available. OCX and AUTOMATION functions are available. However, if they invoke GUI functions, they may cause Navision Application Server to stop running. The only way to restart the application server, is to reboot.
Starting Up Navision Application Server
Before you can successfully start a Navision Application Server, you must create a startup trigger on codeunit 1 with ID number 99. The trigger must have a parameter of type Text with a maximum length of 1024 characters. This parameter is passed to the codeunit trigger, which is always executed when Navision Application Server starts up. This trigger is not defined in the standard application. The interpretation of the text string is the responsibility of the C/AL programmer. If you do not supply the parameter, the Navision Application Server startup procedure fails.
Communication between Navision Client and Navision Application Server
To establish communication between a Navision client and Navision Application Server, you need to start a timer. You can make the application server start a timer that triggers an event at a certain interval. When Navision Application Server receives the event, it can check the database for unprocessed tasks, such as an order.
A user that runs a Navision client can put, for example, a 'send order' task in the task table in the database. Navision Application Server can then check the database for this task.
Example
This is an example of what the startup trigger can look like. First, the trigger instantiates a communication component. Then, if the parameter passed equals 'Test,' the application server is instructed to also look in the task table. The 'Test' parameter starts a timer.
InitComCom.RUN;
CASE StartupParm OF
'Test': InitializeTaskTable.RUN;
END;
Globals:
MyInvoice, Type: Report 50089
SalesHeader.RESET;
SalesHeader.SETRANGE("Document Type",SalesHeader."Document Type"::Order);
SalesHeader.SETRANGE("No.",'04200024');
IF SalesHeader.FIND('-') THEN BEGIN
MyInvoice.SETTABLEVIEW(SalesHeader);
MyInvoice.USEREQUESTFORM(FALSE);
MyInvoice.RUNMODAL;
END;
6. Juni 2007 08:34
stryk hat geschrieben:P.S: Sind wir hier nicht im falschen Forum? Wir reden doch über NAV?
6. Juni 2007 08:41
dann wäre ich mal wieder drauf reingefallen!!!!!
6. Juni 2007 09:21
6. Juni 2007 21:04
25. Juli 2007 13:59