Permission Set – Security Filter

 

Hey Friends,

May be you all are aware about this feature in Permission Set which say Security Filter!! I just used and wanted to share this to you as this will add an extra security layer to your permission set. This basically works on field level, say you want to introduce one permission set and that permission should explicitly make the user to see only those records in Sales Order for which Salesperson code = SR,

Here’s how you can achieve this, Just navigate to Architectural Window./Departments/Administration/IT Administration/General/Permission Sets  and then hit permissions in the Action bar. Here you will find all set objects that has been introduced, just simply navigate to Sales Header and in the right side you will see security filters

 

Assist edit on this and then it will take you to new window which will give you the list of the Fields of that table and then you can apply your specific filter on any of the defined field.

 

Hit OK and you are done. Just apply this Role to any of the user and then cross verify!!

CHEERS

Soap Service – Special Characters

 

Hey Folks,

We all know SOAP Services has it’s own Protocol while commuting over different Platforms. Sometimes Client is willing to send special characters for there own reasons over web service but it is not permitted within SOAP protocols.

Here is the way how you can make this accessible with a tweak, while calling service replace this special characters with:

< is converted to &lt;

> is converted to &gt;

& is converted to &amp;

is converted to &quot;

Now at the other end you just need to decode it to get back the original special character that you have. Here is the code you need to write-

//RWN
Bigtext.ADDTEXT(DecodeSpecialCharacter.HtmlDecode(InputBigtext));
//RWN

Here Bigtext will have decoded value coming in InputBigtext.

DecodeSpecialCharacter    DotNet     System.Net.WebUtility.’System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′

CHEERS

 

Disable Sorting – List Page

 

Hey Friends,

Recently I got a requirement where client asked me to disable Sorting. They don’t want any user to rearrange the data based on any field.  Here is just what needs to be done.

Open list page and navigate to Repeater Property –  Here you will find IndentationColumnName property. Just change it to 0 and we are done.

There are many properties in multiples places across NAV which we don’t bother to experience but it can literally make our life easier.

CHEERS

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’

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/&#8221;) 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).