Click on button then showing DialogBox

mootsoomootsoo Member Posts: 70
Hi
I'm doing one task that saving XML. Now user can save his/her xml in HardDisk. But they wants to save xml file in folder that they wants. And therefore i need to do some dialogbox when clicking one button. i hope someone can help me

best regards
bye my work, bye navision

Answers

  • kinekine Member Posts: 12,562
    Look for Common dialog management (CU 412)... :wink:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • mootsoomootsoo Member Posts: 70
    Ok.
    But what is the Common dialog Management?
    bye my work, bye navision
  • kinekine Member Posts: 12,562
    It is a codeunit as I wrote with ID 412, where you have function you need (OpenFile) - it will open the dialog for you and return the selected file name... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • garakgarak Member Posts: 3,263
    This CU use the "Microsoft Common Dialog" OCX.

    For an example take a look into Form 5077 "Create Interaction"
    Do you make it right, it works too!
  • mootsoomootsoo Member Posts: 70
    Aaanha ok. Now i'm getting the point.
    Tnx guys!
    bye my work, bye navision
  • mootsoomootsoo Member Posts: 70
    hi

    I found CU 412 & Create Interaction form.
    But i dont understand what's doing that form and how to connect CU412 and dialogbox.
    Or i'm understanding nothing. ](*,) ](*,)
    bye my work, bye navision
  • garakgarak Member Posts: 3,263
    //CommonDialogMgt -> CU 414
    //ImportedFileName -> TextString
    ImportedFileName := CommonDialogMgt.OpenFile('WindowTitle','FileDirectoryAndFilename',4,' (*.xml)|*.xml',0); //4 mean a custom file, 0 mean open 1 is save
    

    Regards
    Do you make it right, it works too!
  • mootsoomootsoo Member Posts: 70
    Thanks garak! =D>
    now i'm :whistle: :twisted:

    Best Regards
    bye my work, bye navision
  • garakgarak Member Posts: 3,263
    no problem and welcome
    Do you make it right, it works too!
  • mootsoomootsoo Member Posts: 70
    have can i change to SOLVED this topic?
    bye my work, bye navision
  • garakgarak Member Posts: 3,263
    mootsoo wrote:
    have can i change to SOLVED this topic?

    go to the first post, press edit -> Set the Attribute: [Solved] (it's on top)

    Regards
    Do you make it right, it works too!
Sign In or Register to comment.