popup Prompt from a page

CenterDCenterD Member Posts: 37
edited 2013-08-20 in NAV Three Tier
I am trying to prompt for a variable field from a page

The task I pretty simple:

When you push a button on the Navision pane on a page, you should get a pop-up box prompting for a variable field (not a record/database field)
And whatever you entered should be available in a global variable in the page.

I have tried to make a processingonly report and passing the variable from the report back to the page
through a singleinstance codeunit.

But when I try to call the setvariable function in singleinstance codeunit, from the report, it is running in an endless loop.


Is there any other way to accomplish this task?

Comments

  • KishormKishorm Member Posts: 921
    What you need to do is...

    1) have a global variable in the processing only report and add it to the requestform / requestpage
    2) have a function in the processing only report to return the value of the global variable
    3) in your page you run the report using runmodal and then call the function on the report to return the value of the global variable
  • skullaskulla Member Posts: 140
    You can use input box to gather user input, you need to use Dotnet variable of type Microsoft.VisualBasic.Interaction it has InputBox function to ask for user input. Don't forget to set RunOnClient property to true.
  • CenterDCenterD Member Posts: 37
    Thanks for the input.

    I have made the solution with VB.

    I have noticed however, that if a am running on a client server environment and
    I start the page by using "run" in the development environment
    navision will crash after I close the page.
    it works file if I put the page in a menu and run it from there.

    But as the users don't start the page this way, this error doesn't really matter.
Sign In or Register to comment.