Job Queue Entry & my code unit ?

Dear all,

I have a problme, I am calling my code unit from Job Queue entry and its working. The problem is my Code unit have 3 function:

Function 1 (This function call function 2 & 3)

Function 2

Function 3

in my code unit in the on run trigger i have the flowing (Iam only calling function 1 coz this fucntion wiull call the other fucntion 2 & 3):

---- Onrun(Var Rec: Record “Job Queue Entry”)

---- Function1();

The problem only the first function is executed ! why I don’t know ?

Thanks,

Mohamed

Function 2 & 3 are not executed, Though they are called from Function 1 !

Code for Function 1:

ContractStatusCounter := 0;

HotelStatusCounter := 0;

Loopcounter := 0;

Contact.INIT;

Contact.FINDFIRST;

// >>>>>>>>>>>>>>>>>>>>>> TEST

Contact.SETRANGE(Contact.“No.”,‘1’,‘2’);

// >>>>>>>>>>>>>>>>>>>>>

DB2.INIT;

DB2.FINDFIRST;

REPEAT

IF DB2.GET(Contact.“No.”) THEN

IF ((Contact.“Contract Status”=‘01’) OR (Contact.“Contract Status”=‘02’)) THEN BEGIN

IF (Contact.“Hotel Status” <> DB2.“Hotel Status”) THEN BEGIN

“HotelStatusOld#” := Contact.“Hotel Status”;

Contact.“Hotel Status” := DB2.“Hotel Status”;

Notify.SendHotelStatusChange(Contact.“No.”,“HotelStatusOld#”,Contact.“Hotel Status”,TODAY);

Contact.MODIFY(TRUE);

HotelStatusCounter+=1;

END;

IF ((Contact.“Contract Status” <> DB2.“Contract Status”)) THEN BEGIN

“ContractStatusOld#” :=Contact.“Contract Status”;

Contact.“Contract Status” := DB2.“Contract Status”;

Notify.SendContractStatusChange(Contact.“No.”,“ContractStatusOld#”,Contact.“Contract Status”,TODAY);

Contact.MODIFY(TRUE);

ContractStatusCounter+=1;

END;

END;

Loopcounter+=1;

UNTIL Contact.NEXT= 0;

IF GUIALLOWED THEN

MESSAGE (‘Total line checked %1 \Total Contract Chnaged %2 \Total Hotel Status Changed %3’,

Loopcounter

,ContractStatusCounter

,HotelStatusCounter);