All around NAV dev and test
After a fruitful and enthusiastically received first DDC event, and, not the least important, after a number of new sponsors joining us we have started for the second DDC event. It's knocking on our door.
Nothing definitely set yet, but you might mark January 25, 2011 in your agenda with 2nd DDC event.
So what will be put on stage? That's fully up to you! Have a look at this communication on our LinkedIn group.
For interactive communication we have chosen to use LinkedIn so for those who did not yet join the Dutch Dynamics Community group on LinkedIn: subscribe yourself now and keep an eye on it.
Maybe needless to say: DDC is geographically bounded, i.e. Netherlands (Dutch!) only.
While chasing the recordings and presentations of the Microsoft Dynamics NAV 2009 R2 Developer Day 2010 I was pointed by an MS employee to this page: Microsoft Dynamics NAV 2009 R2 Partner Readiness Materials.
All NAV 2009 R2 material that has been released so far can be found here and all that still needs to (like recordings and presentations of November 10 R2 Developer Day 2010) will be published under these yellow marked headings soon:
On this day 1 Year minus 1 day since I started blogging I am glad to introduce you to this new star in the Dynamics blog-o-sphere: Microsoft Dynamics NAV Thoughts by Arend-Jan Kauffmann. It's good to know that apparently, as he writes himself, Mark and me did get him this far. And hope he will stay there.
Well the start is promising adding a valuable extension to Waldo's solution to print RDL reports from the Classic Client.
Keep it rolling, AJ!
Although you might be aware now that any code in the OnLookup trigger will leave you as a developer to handle everything yourself, you have made the choice to write your own lookup functionality. As mentioned in my previous post OnLookup & OnValidate #1, you not only need to program the look up itself but also have to take care that the selected value is handed over to the field from where the user will perform the lookup, including its validation. Well ... except in the case of programming your lookup code on the relevant form control (see below).
So what exactly does a developer need to take care of when needing to program lookup functionality?
Before we dive into that it’s worthwhile to read this section from the manual of our former "Programming in C/AL" course:
Some application objects have similar triggers, likewise the OnValidate trigger, which exists on tables as field trigger(s) or on forms as control trigger(s). When, after a user action, a value will be validated Attain will execute (in this order)
The OnLookup trigger also exists as field and control trigger. The execution plan, however, is totally different.
Based on this it’s interesting to do some investigations into the validation schema when performing each of the lookups given the fact that both at field and control level the OnValidate trigger has been populated.
When executing a standard lookup the 3 validation levels are executed in this order:
Executing a lookup programmed at field level only 2 validation levels are executed in this order:
No control OnValidate!
And last but not least, when a lookup has been implemented on the control again 3 levels of validation are triggered (and executed):
The code should consist of 3 steps:
Customer No. - OnLookup()Customer."No." := "Customer No.";IF FORM.RUNMODAL(0,Customer) = ACTION::LookupOK THEN VALIDATE("Customer No.",Customer."No.");
The code should consist of 4 steps:
Customer No. - OnLookup(VAR Text : Text;) : BooleanCustomer."No." := "Customer No.";IF FORM.RUNMODAL(0,Customer) = ACTION::LookupOK THEN BEGIN Text := FORMAT(Customer."No."); EXIT(TRUE);END;
Implement your lookup feature as one function on your table so that you can reuse the same function for the OnLookup triggers on the field and control(s).
On the table (field) you could have the following code
Customer No. - OnValidate()// Update some other record(s) in the same table. This will require a form refreshCustomer No. - OnLookup()VALIDATE("Customer No.",LookupCustomerNo("Customer No."));LookupCustomerNo(CurrCustNo : Code) : CodeCustomer."No." := CurrCustNo;IF FORM.RUNMODAL(0,Customer) = ACTION::LookupOK THEN EXIT(Customer."No.");
On the form (control) you would have the following code:Customer No. - OnAfterValidate()CurrForm.UPDATE(FALSE);<Control1000000> - OnLookup(VAR Text : Text;) : BooleanText := FORMAT(LookupCustomerNo("Customer No."));EXIT(Text <> '');
... my good old ex-colleague Gert Robyns (MSFT). Cheers, pal!
While looking for the recordings the Microsoft Dynamics NAV 2009 R2 Developer Day 2010 (haven't found them yet) I stumbled accross these presentation uploaded on mibuso covering a part of Wednesday topics. So for those who could not attend the Microsoft Dynamics NAV 2009 R2 Developer Day 2010:
And also some topics not (really) covered on Wednesday:
And of course you can read the resume's by my colleague Marco: