C/SIDE Improvements in Dynamics NAV 2009 R2

C/SIDE Improvements in Dynamics NAV 2009 R2

  • Comments 21

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!

Stuart 

Leave a Comment
  • Please add 3 and 7 and type the answer here:
  • Post
  • 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.)

  • 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?

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

    +1

  • GTD is useful... but what about something more, such as intellisense on C/AL? :)

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

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

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

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

  • > "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?

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

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

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

  • "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)

  • Shortcut for Global & Locals.

  • 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)

  • 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!

    Stuart

Page 1 of 2 (21 items) 12