Name DataType Subtype Length
ComComIn Automation 'Navision Communication Component version 2'.CommunicationComponent
SocketBAIn Automation 'Navision Socket Bus Adapter'.SocketBusAdapter
OnRun()
if (Condition) then
Start(DefinedPortID); //for the example 6000
Start(Port : Integer)
IF ISCLEAR(ComComIn) THEN
CREATE(ComComIn);
IF ISCLEAR(SocketBAIn) THEN
CREATE(SocketBAIn);
ComComIn.AddBusAdapter(SocketBAIn,0);
SocketBAIn.OpenSocket(Port,'');
ComComIn::MessageReceived(VAR InMessage : Automation "''.IDISPATCH")
InMsg:= InMessage;
insMsg:= InMsg.GetStream();
insMsg.READ(strMsg);
//here you can split the parameter(s)
//and do something .... (like case strMsg of....
.....
//Run a defined codeunit variable
CLEAR(NewCustomerCodeunit);
NewCustomerCodeunit.run;
InMsg.CommitMessage();
Comments
A Nas is a Nav client running as a service , so you will need one.
** SI ** Bert Van Gestel **
**********************
To call a NAV from a other server, i would use Sockets or MSQ (instead of a timer on NAS Server) and call the Socket.
example with following:
[url=http://NASServerIp:SomePort]http://NASServerIp:SomePort[/url]>6000/Parameter1 (Parameter1 could be some like 'CreateCustomer' or 'MakeInvoice' or what else)
hope understandable ;-)
Regards