web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Need Help in Dexterity

(0) ShareShare
ReportReport
Posted on by 515

I need help from Dex experts. I want to show a model window and stop processing current script till the model window gets close. Can anyone guide me how should I do this?

I found "open form FormName return to FieldName". This needs a field to return a value but I am opening form from a script.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Need Help in Dexterity

    Ram, Did you check abort script?  Are you trying to open a lookup window?  

  • ram shenkar Profile Picture
    515 on at
    RE: Need Help in Dexterity

    Thanks Arunprasath for your reply.

    I am not trying to open Lookup window, but I have design a customer message box and want to show it.  Unless and until user close this message box I don't want to execute line of code from calling script.

  • Suggested answer
    soma Profile Picture
    24,410 on at
    RE: Need Help in Dexterity

    Ram,


    Open the form in dexterity and change the window type to "Model Dialog" in under the object section of property window.

    If you open a form with the type of "Model Dialog" users can't do anything without closing this window.

    Hope this helps!!!

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Need Help in Dexterity

    If all customer wants is to enter one value and take that value as input to some other procedure or process, then why not a simple Dexterity "Dialog Box"? "Dialog Box" in GP will stop all processes till user responds with a value. Serves the purpose.

    You can simplify the whole process if that's feasible per your requirement.

  • ram shenkar Profile Picture
    515 on at
    RE: Need Help in Dexterity

    Hi Vaidhyanathan,

    Appreciate for your answer.

    I have tried Dialog Box using ask()  function but my requirement is to show three different lines of text on Dialog box, As per my understanding its not possible in using ask() function. Also there are three button we must have to provide in ask(), I am looking only for two buttons.. So this will not work for me. If you have any idea how to show test on three different lines using ask() please let me know.

    Want to mention a point - Thanks for your blogs http://vaidymohan.com/blogroll, It always help me lots.

  • ram shenkar Profile Picture
    515 on at
    RE: Need Help in Dexterity

    Hi Soma,

    I have use "Model Dialog" but it shows window and complete its execution for rest of line of code. which I don't want.

    please let me know if I am missing something.

  • Suggested answer
    soma Profile Picture
    24,410 on at
    RE: Need Help in Dexterity

    Hi Ram,

    Vaidy suggested a good idea for your requirement. You can follow the same.

    Addition to above your requirement, you can use two buttons (pass empty "" to the third  parameter, it won't show the third parameter values as button) in ask().

    Example:

    ask("Do you want to save this item?","Yes","No","");

    Hope this helps!!!

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Need Help in Dexterity

    So correct me if I am wrong. Customer is required to enter 3 different values on 3 fields and then pass these values to the next process/window/form. It's not just one field, if so we could have used ask().

    Soma was right. You can do away with one button by passing a blank value. But if above is what your requirement is, then ask() is not the way to go.

    You may then try opening the window (with 3 fields and 2 buttons) with following code:

    open window <window_name> of form <form_name> as modal;

    This will open any window as modal dialog window and will not proceed further till user responds to this window and close it appropriately.

    Hope this helps.

    P.S.: Thanks for the feedback on my blog. Highly appreciated.

  • ram shenkar Profile Picture
    515 on at
    RE: Need Help in Dexterity

    I tried this 

    "open window TMsgBox of form TestMessageBox as modal"

    but I am getting error "Cannot open window"

    I am calling this from a global script.  Did I miss something ?

  • Suggested answer
    soma Profile Picture
    24,410 on at
    RE: Need Help in Dexterity

    How many windows inside the form TestMessageBox?

    First you should open your form TestMessageBox. Then only you can open the window TMsgBox inside attached to the form TestMessageBox. Otherwise you can not open the window.

    Better you follow the below steps to achieve your requirement.

    1. In the Form definition, open the form and select TMsgBox under the window section and click Set Main.

    2. Open the window TMsgBox, then set AutoOpen to TRUE & Window Type to "Modal Dialog".

    3. Then call the open form script. It will automatically open your window TMsgBox.

    open form TestMessageBox.

    Note: Don't add any more windows to this form TestMessageBox. Because, if you call the open form script in any other places of your project, it will open the window which having set to AutoOpen, means it will automatically open this TMsgBox window.

    Hope this helps!!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans