Help me Regarding NAS

ajaybabuChajaybabuCh Member Posts: 208
Hi

Please give me the details of do's and dont's on NAS

I knew that we should not use dialogue boxes and confirmations

what else that i do not use while running NAS

Is there any pdf about NAS. Please send me the link

Kind Regards
Ajay
Ajay

Comments

  • kinekine Member Posts: 12,562
    Documentation about NAS is in your DOC folder on install cd (w1w1atas.pdf). More about NAS from designer point of view is in w1w1adg.pdf.

    Example:
    Navision Application Server only supports dataports that don’t use request forms.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ajaybabuChajaybabuCh Member Posts: 208
    can i use form variables and testfield fuction in nas

    when i use the variable of type its throwing the error in event viewer

    that

    You can not use C/AL variables of type Form with NAS
    Ajay
  • kinekine Member Posts: 12,562
    No, how you want to use FORM if there is no GUI???

    No, it is not possible to use FORM under NAS... [-X
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • DenSterDenSter Member Posts: 8,305
    You don;t want to use TESTFIELD because when that fails you get an error message and the transaction is aborted. What you want to do is control every contingency in code. So instead of doing TESTFIELD(SomeField,SomeValue) you do:
    If SomeField = SomeValue THEN BEGIN
      // do something here
    END ELSE BEGIN
      // do something else here
    END;
    
    That's the only way to prevent the event logfrom filling up with errors that you would normally see as a user. NAS is a client session without a human being looking at the screen, so you have to program it to act like one. Use your common sense to determine what you can and cannot do.

    There's nobody looking at the screen, so why would you want to display anything? The only reason you ever should use a form object is when you need to display something. NAS doesn't have a user looking at the screen, so you never ever need to use a form when working with NAS.
  • thaugthaug Member Posts: 106
    Don't forget about the GUIALLOWED function, which is useful for setting up seperate behaviors for the Nav client and NAS. Although there would be no need to use this function in the CU that is running under NAS, it can be a useful function if you are VALIDATEing fields.
    There is no data, only bool!
  • fufikkfufikk Member Posts: 104
    I'm also not sure if you can run a dataport which imports a file from NAS. I had a dataport variable setup with all properties (filepath, import/export direction) and NAS showed error that "you can't use dataport....". That was in navi 3.7. Maybe in v4 its possible.
  • ara3nara3n Member Posts: 9,256
    fufikk wrote:
    I'm also not sure if you can run a dataport which imports a file from NAS. I had a dataport variable setup with all properties (filepath, import/export direction) and NAS showed error that "you can't use dataport....". That was in navi 3.7. Maybe in v4 its possible.

    No it's still not possible in v4.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kinekine Member Posts: 12,562
    As I wrote - this is citation of NAS documentation:
    Navision Application Server only supports dataports that don’t use request forms.

    You need to disable request form on the dataport to be able to use it under NAS...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Tim82Tim82 Member Posts: 8
    I try to start a dataport by the NAS and the NAS displays: "You cannot use C/AL variables of type DATAPORT when running the Microsoft Business Solutions-Navision Application Server."

    In the dataport I set the properties (in brackets the value): Filename (path to my local computer), Import (No), UseReqForm (No), ShowStatus (No).

    I tried to start the dataport with Dataport-var and directly with DATAPORT.RUN(50000)

    I always get the same error.

    By the way: I use the sql-server, maybe it makes a difference.

    Any ideas?
  • kinekine Member Posts: 12,562
    What I found is that documentation says that it is possible but in real world it is not working... 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • DenSterDenSter Member Posts: 8,305
    That is my experience as well.
  • ara3nara3n Member Posts: 9,256
    I suggest writing a codeunit that works just like a dataport.
    This is what I've been doing for integrations and using NAS.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ta5ta5 Member Posts: 1,164
    Just my 2 cents regarding testfield etc.
    If you use the navision timer dll, you could just run your codeunit and in the trigger timer::onTimerError you could handle some errors or write a log
  • Marco_FerrariMarco_Ferrari Member Posts: 53
    Hi all,
    I think you have no problem in using ERROR, TESTFIELD or also MESSAGE in NAS, because simply in that case the messages are all written in the NAS log because they don't need a user decision but they are only messages to the user.
    I think the instructions that must be catched with GUIALLOWED are those ones that want a user decision so: CONFIRM, STRMENU. There are also the Dialog variables that must be controlled with GUIALLOWED.

    Marco
    Marco Ferrari
    Microsoft Certified Trainer
    Cronus.it
Sign In or Register to comment.