String Comparison – Use DotNet Variable


Hey Friends,

I guess many Developers might have had faced this Issue, Whenever we used to compare a Text variable in CAL Coding something like –






We do face Issues like System is not giving Error even CalTextVariable contains a Blank value. Majority times this Issues comes when there is an Integration between NAV and some .NET Portals. Reason behind this issue is, A NULL value is never considered as a Blank value OR even you can say the White Spaces. So this Line of Code is never a Full Proof solution to handle these cases.

But Instead of the above Line of Code If we just Introduce a .Net Variable and write below line of Code then this turns out to be Full Proof Solution.


This Piece of Code will handle each Probability that might ever we skip while Coding.

DotNetStringVariable – System.String.’mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089′

CalTextVariable  – CAL Text Variable.



One comment on “String Comparison – Use DotNet Variable

  1. Pingback: String Comparison – Use DotNet Variable - Microsoft Dynamics NAV Community

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s