Custom Form – Dynamics NAV

Hey Friends,

As we all know we have certain limitations while designing a Page in NAV, i.e. We deliberately cant design our NAV Page as we want to, Actions OR Buttons must be on the Top, We cant make buttons somewhere on the middle of the Page, We can’t design a page in which we can have multiple controls like Buttons, Radio Buttons and so on and possibly anywhere on the Page.

This limitation could be sorted out if we have certain hands on, on Dot Net variables. I just got a requirement where client was asking for certain design on the Page as per his requirement and he hardly cares for the limitations. So I just make a custom Windows Form which anyhow fulfilled his requirement.

You have the liberty to add n number of buttons or other controls or how badly you want to customise it.

WinForm := WinForm.Form;
Colour := Colour.Color;
WinText := WinText.TextBox;
WinForm.Width := 733;
WinForm.Height := 415;
WinForm.BackColor := Colour.Green;
WinForm.ForeColor := Colour.Green;
WinForm.Text := ‘SMS BODY’;
WinForm.StartPosition := StartPosition.Manual;

WinForm         DotNet       System.Windows.Forms.Form.’System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089′

WinText          DotNet        System.Windows.Forms.TextBox.’System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089′

Colour            DotNet          System.Drawing.Color.’System.Drawing, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’

Off The Topic – Shutdown Machine from NAV

Hey Friends,

This Post is just a part of Brainstorming, and doing a research worth needed having out of the box thought that If Client just want to shutdown Machine directly from NAV. Though it will never be demanded but on the counterpart Client Expectation has no limits. 🙂

The interesting part is it’s just a single line of Code which will do the Job .

Process.Start(‘shutdown’,’/s /t 0′); – Shutdown
Process.Start(‘shutdown’,’/r /t 0′); – Restart

Process – DotNet – System.Diagnostics.Process.’System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089′