Useful Dialog Windows with .NET Interop and NAV 2009 R2

Useful Dialog Windows with .NET Interop and NAV 2009 R2

Rate This
  • Comments 4

We have been asked recently how to display a Dialog window for the RoleTailored client that would collect a Directory path.

The old (good) Codeunit 412 “Common Dialog Management” was not suitable for that purpose (and honestly I would love to go for something more RTC oriented).

I thought myself, then, there may be a lot of useful Dialog windows based on System.Windows.Forms namespace.

  1. How to select a DIRECTORY
  2. How to select a FILE
  3. How to select a COLOR
  4. How to select a PRINTER

Attached you will find 1 unbounded page object in TXT format.

The code is fairly simple.

 

These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.

Duilio Tacconi (dtacconi)         

Microsoft Dynamics Italy                     

Microsoft Customer Service and Support (CSS) EMEA

- Thanks to Carsten Scholling from Microsoft Dynamics CSS Germany -

Attachment: UsefulDialogs.txt
Leave a Comment
  • Please add 8 and 4 and type the answer here:
  • Post
  • This all seems very nice, but when I tried to implement it into a codeunit, I get a following error:

    This message is for C/AL programmers: The call to member ShowDialog failed: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notificatin from a service application.

    Is there a way to initiate .NET objects similarly as Automation objects so they would run on local client instead of server side?

  • Hi Urpo,

    if you take a look at the property sheet for the DotNet variable, you will find the property RunOnClient. This is defaulted to <No>. Set it to Yes, if you want the .Net instance to run in the RTC client.

    Christian

  • sei utile come un culo senza il boco

  • Hi,

    I know it is an old post but the attachment is not working and i need to see this example.

    can you please re-upload the file?

    Thanks.

Page 1 of 1 (4 items)