Microsoft Dynamics NAV 2009 R2 has several new features as part of the C/SIDE development environment. After several years (and releases) of building a strong new platform, we are able to refocus our efforts onto making fantastic developer focused features for C/AL developers. You can expect this trend to continue with even more in NAV “7” and further but without further ado, I’d like to introduce you to some of your newest friends…
Also known as Go-To-Definition, I’m sure you’ll become intimately familiar with the keyboard shortcut rather than use the feature name! Go-To-Definition (or GTD to those of us too busy to spell things out properly) enables you to jump to code and open designers with an easy shortcut. GTD works on code context, which means that if you’re on a Table variable and you do CTRL+F12 then the Table Designer will spring open and you can easily review field information or check properties. COOL!
And if you’re on a system trigger (like VALIDATE) and there is code in the Validate trigger, then CTRL+F12 will take you to that method! Awesome!
Lastly, and by now this won’t be much of a surprise, if you’re on a user-defined function then pressing CTRL+F12 will take you to that code. Kapow!
GTD doesn’t work for rec or currform/currreport yet but we have room and time for improvements. Let us know if you’d like GTD to take you somewhere else in the app!
And if you don’t like shortcut keys, you can also access Go-To-Definition via right-click or through the View menu!
Figure 1 – using Go-To-Definition on a Table variable will open Table Designer. Using it on a function will jump to the code for that function.
2. Lock/Unlock of Application Objects
Have you ever lost work because the developer sitting next to you modified the object you were currently working on? We can’t restore your lost work but we can do something about losing more work in the future. Check out the two new fields in the Object Designer – Locked and Locked By. Now you can ‘reserve’ or place a lock on an application object and any subsequent developers will now get a ‘read only’ version of that application object. This means that other developers can still see the code but they can’t save and overwrite your work.
To make sure that no one loses work, a ‘read only’ object can still be saved and compiled, but you can’t overwrite the original ID.
Look for the client setting in Tools->Options called “Auto lock on Design” to make the feature activate automatically when you open an object.
Figure 2 – Two users, userA and userB are working in the same database. UserA can see that userB has already locked codeunits 80 and 81 and is trying to lock Codeunit 82.
3. Page Designer Improvements
We’ve tweaked a couple of parts in Page Designer. Firstly, we completed the New Page Wizard so that it will now also offer you to pick factboxes for your pages. This was quite an oversight as factboxes make pages much more valuable than forms as you can include much more related information in them. Next, we changed the default naming of factboxes so that in the page you’ll no longer see name and ID as <control20061721008> but instead see a much more readable name like <OutlookPart>. Nice!
Figure 3 – FactBox picker in the New Page Wizard.
4. Structure Highlighting
Finding pages a bit hard to read? Need a microscope to see what’s indented and what’s not? We agree that it’s hard to see where the structure is in pages and so we’ve introduced Structure Highlighting. Now any record (row) that is a container will be in bold. It’s a simple change but it makes a huge difference to the readability of the pages. The bold lines break up the groups and the readability of the page is dramatically increased.
Figure 4 – Structure Highlighting. Showing a simple example on a small page here because it’s hard to include a large page. However, with the container lines highlighted, the overall structure of the page is more readable. And if the page had more containers (FastTab groups, Repeater sections), then they would stand out quite prominently.
Recently Microsoft hosted a Hot Topic session that included the improvements discussed in this post. It is called “Microsoft Dynamics NAV 2009 R2 Hot Topic: What’s New for Developers.” A recorded version of the session can be seen at the Partner Learning Center.
We hope you enjoy the new features and, as ever, if you have suggestions for improvement you’re welcome to get in touch (either in comments, directly to me in email: email@example.com, or using the MSConnect feedback tool).