It looks like you're new here. Sign in or register to get started.
CGStarted := FALSE;
ParamStr := NASID;
SepPosition := STRPOS(ParamStr,',');
IF SepPosition > 0 THEN
Parameter := COPYSTR(ParamStr,1,SepPosition - 1)
Parameter := COPYSTR(ParamStr,1);
IF Parameter = 'CG' THEN BEGIN
CGStarted := TRUE;
IF Parameter = 'YOUR CODE' THEN BEGIN
// Your code
ParamStr := COPYSTR(ParamStr,SepPosition + 1);
UNTIL SepPosition = 0;
IF NOT CGStarted THEN BEGIN
WORKDATE := 0D;
IF NASSetup.GET(NASID) THEN BEGIN
IF NASMgt.GetSendMail THEN BEGIN
IF NASMgt.GetPerformSynch THEN
IF NASMgt.GetPerformRequests THEN
Another possibility : why don't you put the GTS-logic in the jobqueue? So you don't need its singleinstance anymore to trigger it.
You just need to use nas.exe and not nassql.exe and use the same type of connection parameters as for the client.
You need to give a windows login to the service that has also permission to use NAV (so you need also give permissions to that Windows user in the NAV permissions.
An easy way of testing is login in Windows with that Windows user. Start NAV using Windows authentication. If you can enter NAV, the NAS should be ok.
Is that the complete description?
Seems to be missing something.
Entering in Nav with that user using windows logging is just to be sure that the security in NAV is ok.
The service you need to start using a administrator on the machine.
Go in the properties of the service.
1) In the general tab, the "Path to executable" must point to the nas.exe for native DB and nassql.exe for the SQL DB. Are you using the correct one?
2) in the Log on tab, you need to change the account to an account that has acces in the NAV DB. (Network Service has no access).
Function with ID 99 in codeunit 1 is only lauched once at the start of the NAS. It launches the code in that function and then finishes, never to enter again in that function.
The trick is to let execute a singleinstance codeunit and configure something that can be triggered by outside processes (like a timer event or a MessageQueue event).
Licensing in itself is separate for users and NAS's.
But when a count of the connected users is done, they are counted together.