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.

//RWN
WinForm := WinForm.Form;
Colour := Colour.Color;
WinText := WinText.TextBox;
WinForm.MaximizeBox(FALSE);
WinForm.Width := 733;
WinForm.Height := 415;
WinForm.ActiveForm;
WinForm.BackColor := Colour.Green;
WinForm.ForeColor := Colour.Green;
WinForm.BackgroundImageLayout(Layout.Center);
WinForm.FormBorderStyle(FormBorderStyle.SizableToolWindow);
WinForm.Text := ‘SMS BODY’;
WinForm.StartPosition := StartPosition.Manual;
WinText.BackColor(Colour.LightBlue);
WinText.Font(Font.Font(‘Algerian’,12));
WinText.Width(733);
WinText.Height(415);
WinText.Multiline(TRUE);
WinForm.Controls.Add(WinText);
WinForm.ShowDialog;
//RWN

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

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

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

Advertisements

Remove Attribute – Soap Request XML(XmlPort)

 

Hey Friends,

We all know how to remove Namespaces from the XML if we want to import it from NAV XmlPort, I just faced a situation where I was using XmlPort to send Soap Request with Default Namespace. Using default namespace creates an attribute something like this (xmlns:xx=”http://xx.org/soap/envelope/”) in the soap::Body which basically disrespects the Soap request as sometimes it’s not needed in the protocol of the soap request. So now if we use Remove Namespace code then it will remove the namespaces from the entire XML i.e. Soap:Header as well. In this case here is the code that you need to write to just eliminate it from the soap:Body.

untitled

Now when you load this BigTextOutputValue to your XmlDoc, you will have a XML with no Attributes in the Soap:Body and you can send this as a Soap Request via HTTP.

BigTextVaue  –   DateType  – BigText

BigTextOutputVaue  –   DateType  – BigText

CHEERS.

SQL VIEW – NAV

 

Hey Friends,

I just experienced a case where Client want to see a common list Page in NAV where he can see a data which is basically a combination of multiple Tables. Though it’s achievable in NAV but you need to write a bulky code on the page which eventually turns off the Performance.

So what I did I made a SQL view for this combination which is very simple from SQL’S point of view.

untitled

When you will execute the above view in SQL you will have the exact look and feel what client was expecting in NAV. So what you need to do is you have to make a new Table with the same name as of the view and with the same columns as shown below

untitled1

Now you have to turn on the below property of the Table to get this interconnected.

untitled3

Now when you will run this Table you will get the same desired results of  what you experienced in SQL.

P.S – Only do this when you have a combination of multiple tables and is really critical, as it’s consuming a Table Object in NAV.

Quick Filter in Microsoft Dynamics NAV

 

 

With the introduction of Microsoft Dynamics NAV 2013, Microsoft had changed the Quick filter functionality and this blog post is a summarize version of the article published in the MSDN Blog.
The following table illustrates more Quick Filter search examples in Microsoft Dynamic NAV 2013.

 

Search Criteria Interpreted as… Returns…
Man @man* All records that start with the string man and case insensitive.
Se @se* All records that start with the string se and case insensitive.
Man* Starts with Man and case sensitive All records that start with the string Man
‘man’ An exact string and case sensitive All records that match man exactly
*1 Ends with 1 All records that end with 1
@*man Ends with and case insensitive All records that end with man
@man* Starts with and case insensitive All records that start with man

The following table illustrates the Quick Filter search examples for the Cumulative Update 13 and later for Microsoft Dynamics NAV 2013 and Microsoft Dynamics NAV 2013 R2.

 

Search Criteria Interpreted as… Returns…
Man @*man* All records that contain the string man and case insensitive.
Se @*se* All records that contain the string se and case insensitive.
Man* Starts with Man and case sensitive All records that start with the string Man
‘man’ An exact string and case sensitive All records that match man exactly
*1 Ends with 1 All records that end with 1
@*man Ends with and case insensitive All records that end with man
@man* Starts with and case insensitive All records that start with man

Enjoy.

 

Upload License

 

Method 1.

1. Open Development Environment + Object Designer.
2. Navigate – Tools -> License Information.

3. Once you press License Information, Following window will get displayed which will show the description of the current license running.

4. Now to change the License simply press change and choose the destination folder from where you want to Import. Just remember you have just changed the License so it’s just temporary. To permanently change the License you need to upload this to your Database.

5. Now again Navigate to same place, Tools -> License Information but this time instead of changing License choose upload button to upload the License. This will get saved in your Database and any time you open, you will be in your Development environment with this License.

6. Once it’s uploaded you will get following confirmation message.

 

Method 2

1. Navigate to File -> Database -> Alter

2. Push Integration tab. You will see “Save license in database”. Choose and press OK.

3. Now follow the process as stated above.

NOTE –  MUST RESTART YOUR DYNAMICS NAV SERVICE ONCE LICENSE UPLOADED.

Enjoy.

Quit, Break, SKIP, EXIT

 

1. Quit 

  • Quit can only be used in Report, Data-port or XMLport. (Like Currreport.quit/Currxmlport.quit). It completely stops the execution of code,. If some execution already occurs before the quit statement then all of those processed will get rolled back.

2. Break

  • In a Report Dataport or XMLport. This statement will take you out from any trigger.This statement will break the  Repeat – Until loop and come out of the loop without any further executions. Processes performed before this will  remain executed.

3. SKIP 

  • In a Report Dataport or XMLport. It skips the execution for certain conditions applied.

4. EXIT

  • EXIT normally used in a function to return a value. It can be up to the developers requirement like what he wants in   return if a function gets called like a decimal value, a text or a code value. It can be too used with some calculations like EXIT (X/Y  + A * B).

 

Navision Terms S to Z

Shortcut Key − A keystroke or keystroke combination that moves to another
screen or function within Navision.

Sort − The ability to change the order in which records are displayed or printed.

SQL − Structured Query Language.

Status Bar − Located at bottom of the application window; it shows the name
and contents of the active field, work date, user ID, and whether a filter
(FILTER), insert (INS), or overwrite (OVR) mode is on.

System Date − The date of your computer.

Table − A table consists of a group of related records, each record is made up of
fields and each field holds one piece of information; one example of a table is the
entire listing of Vendor records. One of seven Object types in Navision.

Continue reading

Navision Terms O to R

 

Object Designer − The interface used to modify or design additional forms,
reports, tables, dataports and codeunits.

Objects − The building blocks of Navision. There are seven types of objects:
Forms, Tables, Reports, Dataports, Codeunits, XMLports, and the MenuSuite.

ODBC − An acronym for Open Database Connectivity. ODBC enables Navision
to be linked and data copied to Excel, Crystal Reports, etc.

Option Button − A circular field which serves to select only one option from
those listed. Clicking in this field indicates the desired choice.

Option List − One of four types of AssistButtons. The Option List is a short,
predefined list from which the user selects the desired choice.

Order − An original entry document in Purchases and Sales allowing
information to be recorded and posted for purposes of recording amounts due
to/from Vendors and Customers. Orders differ from Invoices in that Receiving
and/or Shipping are done from an Order.

 

Continue reading

Navision Terms M to N

 

Master Item − The primary table in a granule, around which that granule
functions. For instance, Customers are the Master Item in Sales; Vendors in
Purchases; and Contacts in Marketing.

Menu Bar − Located just below the Title Bar; this standard Windows feature
contains pull-down menus to select functions such as creating new companies,
design tools, and help.

Menu Button − Have a downward-pointing triangle on them and they are found
on the majority of windows. When clicked, they display a menu from which you
can, for example, select a function, open a different window or open a submenu.

MenuSuite − The MenuSuite object contains the menus that are displayed in the
Navigation Pane and in the Navigation Pane Designer. Each menu contains
content for a specific departmental area, for example, Finance or Manufacturing.
One of seven Object types in Navision.

 

Continue reading