This Automation variable has not been instantiated in NAV 4

manisharma31
manisharma31 Member Posts: 285
Hi Guys,
I have written below code on the Run trigger of a codeunit,

ReminderSetup.RESET;
ReminderSetup.SETCURRENTKEY("Primary Key","Client Type","Credit+ Courier Delay Day 1");
IF ReminderSetup.FINDFIRST THEN
NasRunTime :=ReminderSetup."Check Time" * 60;

IF ISCLEAR(NasTimer) THEN
CREATE(NasTimer);

NasTimer.Interval := NasRunTime;
NasTimer.Enabled := TRUE;

When i Start NAS i get the following error i event viewer,
This Automation variable has not been instantiated.
You can instantiate it by either creating or assigning it.

Any help why this error is comming ???
Regards,
Manish

Answers

  • pdj
    pdj Member Posts: 643
    Does it work if you run the codeunit directly from the designer?
    Regards
    Peter
  • manisharma31
    manisharma31 Member Posts: 285
    Yes,it is working.

    We have tested the whole functionality via NAS on out testdatabase & it is working fine..
    Now we are going live on the Production Server & we are stuck for some stupid problem.
    Regards,
    Manish
  • Marije_Brummel
    Marije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Is the DLL registered on the production server? Is the NAS running as a (local) Admin?
  • kriki
    kriki Member, Moderator Posts: 9,121
    [Topic moved from 'NAV Three Tier' forum to 'NAV/Navision Classic Client' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • manisharma31
    manisharma31 Member Posts: 285
    The DLL was installed by default when NAS was installed.

    Do i need to register it again ?

    No the NAS Service is not using the Local Admin account.
    Regards,
    Manish
  • Marije_Brummel
    Marije_Brummel Member, Moderators Design Patterns Posts: 4,262
    What happens if you run the client on the production server and start the function? Remember to start the client with the same windows user as the NAS uses.
  • manisharma31
    manisharma31 Member Posts: 285
    But if that was the case then in one of our client the there we have NAV 5.
    The NAS service is using some other id & the client is using another id,still they are working.
    How ?
    Regards,
    Manish
  • Marije_Brummel
    Marije_Brummel Member, Moderators Design Patterns Posts: 4,262
    What on earth do you mean to say... :|
  • manisharma31
    manisharma31 Member Posts: 285
    The problem is solved as mentioned at my end.
    Client exe needs to be closed when you are using NAS on the same computer.
    Regards,
    Manish