Wednesday, September 8, 2010

Nav 2009 SP1 RTC Images

A handy link to the available RTC Images.

Friday, August 20, 2010

NAV 2009 Role Tailored Client Development Quick Start

I am muddling my way through adding some classic client items to role tailored client in NAV 2009 and thought I would keep track of things that I found to be difficult. The most helpful resource online I have found so far is on MSDN:

Pages - These are simple to create and add fields to, but you can't format them beyond changing captions.

Menus - These are very confusing, there are 2-3 types that all have to be updated if you create new pages and want your users to have access to them:
--Menu Suite - You have to create NEW menu suites, separate from the Classic suites - go to New and select "Design For.. Role Tailored Client"
--Roles - Users are assigned to different roles (See Departments -> Administration -> Application Setup -> Role Tailored Client), so you have to update all the pages tied to the roles that are related to the page you have created. The pages are found in the 9000-9999 range.

Page Links/Actions - To create links between pages you have to add actions. Open the Page, select a blank line at the bottom of the list of elements, select View Actions.

You can create several types. Here is some more information on Actions.

Some key info: For basic stuff, the actions go into an Action Container, either RelatedInformation or ActionItems. You can have then show with their own icon if you indicate they are Promoted in their properties. You have to indicate which group they show up in. There are 3 default named groups, New, Process, and Report. You can assign names to several additional groups in the Page Properties.

Thursday, September 3, 2009

Javascript Command Line

I never really mastered shell programming, but I do have JS skills. Maybe this article will come in handy.

Tuesday, July 7, 2009

Granting Execute Permissions to SQL Users

Granting exectution permission to users in SQL used to mean giving them DBO or granting permission to each stored proc. individually.

Last year I found a stored proc that would grant permissions when called but when new stored procs are created, you have to re-run it.

Today I found out that there is a way in SQL 2005 and later to create a new role that has execute permissions to all with the following Code:

CREATE ROLE db_executor

GRANT EXECUTE TO db_executor

After you have executed that script you can then see the role in the permissions list and assign it there. The user will then have permission to stored procedures added later.

Wednesday, July 1, 2009

VMWare Tips

VMWare Player is free, and it works ok, the UI is a little slow, but it works well otherwise.

VMWare Server is also free, and it works well but does not support audio.

VMWare Converter is free, it can make a VM from a physical computer (as well as do some other things I haven't looked into yet)

I am very much a rookie at VMWare, but I have found out a couple things about VMWare workstation Settings:
  • It is a hassle to increase the size of the C:\ drive so make it big enough to start.
  • It is easy to add drives, but you have to format them in Windows before you can use them.
  • Use Bridged networking if you need to browse network shares.
  • Make sure the sum of RAM available to your VMs does not exceed the amount of RAM on your machine, leaving around 512mb for the root OS (for win XP pro).
  • Install VMWare tools or the UI is very clunky
  • Use the shared folders feature on the Options tab of the Settings dialog to share drives on the root OS with drives on the VM.
  • Don't take a snapshot of a paused machine, or a running machine if you ever want to clone it. You can't clone a running or paused snapshot.

Tuesday, June 30, 2009

Doing a re-install on a Lenovo T60

After exactly 2 years of use, my Lenovo T60 was all messed up. Here are some of the problems I came to experience:
  • Windows required 12-15 minutes to start up.
  • It required 5-7 minutes to shut down.
  • When "waking" from sleep status onto a new network, the OS could not re-configure itself requiring a re-boot.
  • Trying to italicize something in Excel required 2 minutes the first time.
  • The 100 gb HD was full and required constant effort to empty so I could work.
  • All my music had to be stored on thumb drives
  • There were at least a dozen extra services starting up and I had no idea what they did.
So I decided to get a new HD and re-install Windows XP from scratch, and decided not to use the Lenovo system disk since a lot of what was installed was not required.

Further, I decided to ONLY install windows, VMWare workstation, and any VPN software I might need to connnect to my client's networks so that re-boot times and network problems would not recur and to do all future work on VMs. We subscribe to Microsoft's ActionPak program so we get 5 copies of every OS they offer for development purposes.

2 weeks later, I am nearly done. It has taken me at least 24 hours of effort, and almost every day until today I have had to switch back to the original HD to get most of my work done.

I decided to work on 3 VMs:
A pure development VM with
  • SQL 2008 Developer,
  • VS 2008 and various toolsets I use like telerik and subsonic
  • VSS,
  • SQL Compare,
  • Dynamics NAV
  • A good editor ( I used to use JEdit, but it craps out after being left open too long and I don't like to have Java running just for one editor, so I need to find a new one that has a good XML indent feature, side-by-side comparisons, text highlighting, and can deal with VERY large files. If you know of one let me know).

An application VM with

  • MS Office (including visio and project)
  • Inkscape

A throw-away VM with

  • I-tunes
  • Firefox
  • Java
  • uTorrent
  • VLC Media Player
  • SQL 2005 for legacy SSIS package work I may need to do.
  • All the other crap I have to load to get things done or because I am curious to see how it works

The first problem on the T60 is you have to change your system bios storage settings to be "compatible" to get it to install.

Once that is done, you can run windows update to get some drivers and download the rest of the drivers here for the HD, Intel Chipset, and Wireless, then change the storage settings back. That took me about 4 days to figure out and complete, I did not install any other drivers to ensure I didn't have things installed that I don't need.

Next, validate your XP Install, patch it, and purchase (or demo) VMWare workstation, and use VMWare converter to make an image of your machine and run the VMs, install the appropriate software, and start moving all the data (I bought a USB enclosure for the SATA drive to make that easy).

Install the VMWare tools to increase performance significantly, and if you partition the HD on your root OS, you can share one of the partitions between all the machines as a network share so they all have access to the same data.

Unfortunately that share can not be used for SQL databases, since it is not seen as a local volume, so make the development VM large enought to hold all the databases, and all the backups. I needed to add a 20gb extra drive for a total of 50gb, and I only have about 10gb free on that VM.

I will need some more RAM to run all 3 VMs at once, but I was going to up my RAM from 2gb to 4 gb anyway.

After all that work, it is a bit cumbersome to move things between VMs, but all the issues that led me to this configuration have been resolved and it takes 1-2 minutes to boot up, less than 1 minute to start up a VM that was paused, and 1-3 minutes to shut down. Plus I don't have to shut down to get networking to function when changing networks. I think that this change will be saving me 20-30 minutes a day. So my ROI is about 4 months. If I had to do it over again, I think it would take about half as long, so if you stumbled upon this, hopefully it will take you less time.

And when I get a new machine in 1-2 years, the migration should take less than an hour.

Wednesday, March 25, 2009

Determining an object size in C#

I am implementing business logic for a web application that will result in a sizeable data structure being housed in a class. I may decide to cache the class in the session at some point and I wanted to know how much RAM the class takes up. To figure that out, the best way I could find (here) was to serialize it and determine the size of the resulting binary. Of course the entire class (and any classes it holds as public properties) needs to be serializable.

long lSize = 0;
System.IO.MemoryStream stream = new System.IO.MemoryStream();
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter objFormatter =
new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
objFormatter.Serialize(stream, this.SalesOrder);
lSize = stream.Length;
output.Write("Size of the Object: " + lSize.ToString());