C/SIDE Improvements in Dynamics NAV 2009 R2

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...

1. CTRL+F12

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: sglasson@microsoft.com, or using the MSConnect feedback tool).

Thank you!


Comments (21)

  1. Peter says:

    Cooool Stuart πŸ™‚ I'm sure you will get spammed for asking for suggestions, so I'll write mine here: πŸ™‚

    Does R2 fix the problem with colorcoding of comments in brackets?

    Does the lock/unlock ensure we never change an old version of an object because of the object cache?

    I will suggest the GTD should jump directly to the on-line help for system commands, like SETRANGE and RENAME etc. (Even VALIDATE – if you wish to find the actual OnValidate it would fine to press Ctrl-F12 on the field, and then press F9.)

  2. Horst says:

    That's awesome!

    Does GTD work if the method is within another object?

    Will lock/unlock be available by code?

    Are there any plannings to create a functionality like "Where used…" without using DevToolKit?

  3. guidorobben says:

    <i>Does R2 fix the problem with colorcoding of comments in brackets?</i>


  4. Stefano Demiliani says:

    GTD is useful… but what about something more, such as intellisense on C/AL? πŸ™‚

  5. einsTeIn.NET says:

    What I would really like to see is a return value for VALIDATE.

    [Ok :=] VALIDATE(Field [, NewValue])

  6. dtacconi says:

    What if a real Visual Page Designer where you can drag and drop object and the part stored in the Object Metadata table is created on the fly ? The same approach as Form Designer. Design your Form and then add code inside. Design your Page graphically and when you have this done feed the trigger in it with the appropriate code…

  7. guidorobben says:

    Add .xml to the file type "Dynamics NAV Object Files and Text Files" during import.

    Add the moment you only have have .fob & txt. This is very annoying because you have to witch a lot on the type dropdown list when using this in combination with the transformation tool.

    Just make it *.fob, *.txt, *.xml.

  8. Mike says:

    > "You can expect this trend to continue with even more in NAV "7""

    I thought the development tool for NAV 7 will be Visual Studio and no more C/AL Editor?

  9. Mirko says:

    oh, yes…what about a REAL undo in the code? (ctrl+z)

  10. Reijer Molenaar says:

    Very cool Stuart!

    Will there be a new table for the object locks or are this fields added to the object table?

    And is there some kind of (adjustable) trigger fired when an object is locked and unlocked?

    Because then it would be possible to export the object to a repository…

  11. Reijer Molenaar says:

    And what also would be a tremendous timesaver is the possibility to select a key in the β€œC/AL Symbol Menu”.

  12. Mirko says:

    "And what also would be a tremendous timesaver is the possibility to select a key in the β€œC/AL Symbol Menu”." <– or we can hope that GTD will work while focusing on SETCURRENTKEY instruction of cal code…the only 2 problems of those approaches would be the line lenght (with long keys it will overflow the limit) and the double quotes (this one, probably only with the GTD approach)

  13. guidorobben says:

    Shortcut for Global & Locals.

  14. Martijn van der Laan says:

    Cool improvements! Some improvements I am thinking of:

    – Remove the line limit!

    – Shortcuts to acces local variables, and not via Alt-v-a and then use the mouse to go to the Variables-tab if no Parameters are used (the local-var-form is not-editable if no parameters are used)

  15. Stuart Glasson @ Microsoft says:

    What a great bunch of comments! Thanks guys – it's nice to get noticed!

    A couple of responses here_

    @Peter – we can't fix the syntax highlighting for {} comments without changing the way we read from the Database.  It's really a lot of work and risky and we can't justify it for R2.  Sorry, it would be nice though.  Object Cache: we have fixed a couple of bugs where object cache stops you getting the latest version.  It's probably not fixed for everything but it should be better. (I know that one is a pain).  Finally, thanks for your comments about GTD for SETRANGE & etc.  We'll see what we can do.

    @Horst – GTD does work if the method is in another object.  And it's clever enough that if you have two methods with the same name in different objects, it will jump to the right one.  Lock/Unlock is available through code (it's just the object table) but the 'locked by' field is set by the system so don't try!  And finally, yes we all dream of a 'where used' without DevToolKit … Somewhere over the rainbow we are working on it.

    @guidorobben – Sorry the *.xml|*.fob|*.txt dialog is clunky.  You do need to watch what you do.

    @duilio – Unfortunately doing a fewture like Drag and Drop for Page Designer like for Form Designer in C/SIDE means we'll be even more delayed in ever getting to our ultimate dream which is to put the development environment into the RTC.  Now, when we make that happen, I can easily see a drag and drop Page Designer and maybe we can make it so nice that you don't even need to SEE the Page in xml text view again!

    @Mike – We are committed to moving the development environment to the RTC but it will take us multiple releases to get there.  R2 has improvments for Page Designer and coding, NAV 7 has a couple of big features that I'm probably not allowed to say, but, will be targeted at helping Developers build and validate their solutions.  Beyond NAV 7 we will be able to take more and more and eventually we'll say 'farewell' to C/SIDE and 'Hello!' to RTC tooling.

    @Mirko – Undo is much more realistic when we have been able to build new editors inside of the RTC.

    @Reijer – Locking is on the Object Table.  Versioning is a very interesting feature isn't it? ^^  Keys in Symbol Menu is also quite interesting. ^^  Oficially I have no statement but I can empathise that it would be very nice for you guys to get those features.

    In closing, I'd like to leave you with one of my problems … how do we find the balance between building new features to help you in C/SIDE while you help us convert everyone to the NAV Server and RTC while at the same time, leaving our development teams enough time to do the huge rework that is required to get us to RTC tooling.

    Thanks again for your comments!


  16. guidorobben says:


    You never mentioned anything about the shortcuts for Local Globals. Any news on this?

  17. Stuart Glasson says:

    We weren't able to complete the work for shortcuts for Locals/Globals as part of R2.  We do however have another round of improvments in the pipeline.



  18. Smitty says:

    Real nice and usefull improvements.

    I know that both GTD  ( Ctrl+F12 ) and the Object Lock will be a huge help for both me and many other developers.

    I will however follow "the pack" and say that an extension to tables under F5 where you can pick any active key will be a huge help  –  and something there should have been there from Day 1  πŸ™‚

    Just as a little fun "kick"  –  that function was available in the DOS based version  –  so you already know the way to do it  πŸ™‚

    Overall lots of very good improvements, that I think we all are looking forward to playing with.

  19. Joerg says:

    As a newby in C/AL I have to say that this (e.g. locking) is absolutely standard since years in software development due to using CVS, Surround, etc. …

    Question: Who can unlock a file if the user who locked it is not available? Every other normal user?

    Still missing and also part of every simple Environment since decades:

    – A good search! Miserable standard search!

    – A code completer!

    – Hyperlinks: If I use a complex variable (Codeunit, Table) or a function of it, I want to click on it and C/AL should open the file!

  20. Peter says:

    I can't find the setting in Tools->Options called "Auto lock on Design".

    There is no lock/unlock when rightclicking an object.

    I downloaded a localized version, after that I tried the W1 version, still no succes.

    I did download R2, because the GTD is there. Am I missing something?

  21. Sebastian Mucee says:

    Thanks Stuart,

    Bolding containers in page definition (designer)is a plus.

    I suggest a ultimate target – give us an expand/collapse (+/-) option. Bolding containers does not help much when my page elements take two or more full screens.

Skip to main content