How can we solve this error in NAS?

jithin01jithin01 Member Posts: 10
Hi All,

How can I solve this error "You cannot use C/AL variables of type DIALOG when running the Application Server for Microsoft Dynamics NAV Classic." . Can we resolve this issue with out change any standard code? If anybody can help on this, It would be highly appreciable.

Thanks,

Jithin.

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    yes Use GUIALLOWED statement before Dialog statement
    Like
    IF GUIALLOWED THEN
      <Dialogue Code>
    
  • jithin01jithin01 Member Posts: 10
    With out changing the standard code, Is there any method to resolve this issue?

    Thanks,
    Jithin
  • vaprogvaprog Member Posts: 1,141
    Standard code with unguarded (GUIALLOWED) use of variables of type Dialog is either outdated or not intended for use in NAS. So, either update or don't use that code in NAS (or modify accordingly). There is no other way.
  • ta5ta5 Member Posts: 1,164
    jithin01 wrote:
    With out changing the standard code, Is there any method to resolve this issue?

    Thanks,
    Jithin

    Without changing the code you cannot use nas. Anyway, there are other automation methods (for example ExpandIT Tools, form with a timer event, etc).
    Just to keep this in mind. Every automation method has pros and cons.
    Thomas
  • MarijnMarijn Member Posts: 69
    Just put that IF GUIALLOWED statement before every piece of code which appeals to the human senses, like throwing forms, dialogue boxes or anything else that will display stuff and assumes a user sitting behind a workstation to react upon it. Also a noise like BEEP will cause this error. Because when using a NAS or webservices, there is no user to make decisions. That GUIALLOWED statement should have been there in the standard object. If not, write it yourself. That's the way it is. And never code anything yourself which causes this very same error. Always assume your code will someday be called by a NAS or webservice. These GUI-less users should be as respected as any human user so put this very simple statement in place so standard NAV and your custom logic will work without errors for all users.
Sign In or Register to comment.