RSS

Tag Archives: Tips

Tip: Missing a namespace?

When using classes in certain namespaces of .NET you need to include the using statement at the top of you code.
If you fail to do so the compiler won’t be able to find the class.

Example:

XmlDoc.Load(Path.GetDirectoryName(Assembly.GetAssembly(typeof(OCIForm)).CodeBase) + “SampleXMLFile.xml”);

Here the Path and Assembly classes will not be found because I haven’t included the System.IO and System.Reflection namespaces.

You can add them manually if you know by hard which namespace to use for this class. But if your memory fails you, you could simply right clich the classname and select Resolve > Using System.IO;
The using statement will be added automatically.

Resolve function in VS

Resolve function in VS

Visual studio will automatically search for the namespace. ;)

 
Leave a comment

Posted by on March 17, 2009 in .NET

 

Tags: ,

Tip: Copy pasting error screens

Something simple but some people don’t know this is possible.

When you get an error message in NAV (or any error screen in Windows) you can just simply press Ctrl+C to place the text of this error screen in the clipboard.
Something worth mentioning to customers so they don’t have to make screenshots every time and send them to your Customer Support.

Say the customer gets an error in NAV when posting an order.

They would usually send the error screen to the CS like this:

Location Code mandatory
What the user could have done was just press Ctrl+C when focusing on the error screen and just paste it in a mail.
The result would be:
—————————
Microsoft Business Solutions-Navision
—————————
You must specify Location Code in Sales Line Document Type=’Order’,Document No.=’VO704282′,Line No.=’10000′.
—————————
OK  
—————————
Could save you some diskspace ;-)
 
Leave a comment

Posted by on February 13, 2009 in NAV

 

Tags: ,

 
Follow

Get every new post delivered to your Inbox.