Question

Is it possible to run a CODEUNIT via NAS (Navision Application Server) while the codeunit itself contains a function from FORM object?

P.S.: Navision version: 2009 R2

Was it helpful?

Solution

You are able to run code on NAS as long as this code doesn't actually call form functions. E.g., the following code is fine for NAS:

IF GUIALLOWED THEN
  MyForm.SomeFunction();

But you will not be able to run function from a form even if it contains only non-GUI-specific logic. This is one of the reasons not to put any business logic on forms :)

The same rule goes to NAV Server and Web Services. Form (and dataport) objects are not being translated to C#, so it is not possible to run code from a form or dataport.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top