Using Function Start Session and assign Automatically a new session ID

Dea All,

Iam trying to fire STARTSESSION function in Navision 2016. I have a CU which will insert for me a new record in a table.

I am using the function like this:

OK:= STARTSESSION(SessionID, CODEUNIT::“Mza_Insert_In_Table”, ‘TestCompany’,’’);

STOPSESSION(SessionID, ‘Record was inserted’);
ERROR(‘Session was stopped’)

Each time I run this code I get this error: “Avariable was expected” and Navision aims to field “Session ID”

------ > “Session ID” is a variable of type Int. I thought navision will assign the the session ID Automatically! or I have to assign the session ID manually? If yes how can I do it?


issue Solved as follow (Example):

STARTSESSION(SessionEvent.“Session ID”,CODEUNIT::“Parallel Processing 2”,COMPANYNAME,ItemLedgerEntryTMP01);
SessionEvent is a Temporary Table which’s ID is 2000000111, Session Event.