Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 2 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
In NAV 2015 I by accident used SETCURRENTKEY with a key that not existed. When I ran the codeunit no errors occured.
When I look at the documentation it says
"If no keys can be found that include the fields that you specify, the return value is FALSE. If you do not test the return value, a run-time error occurs. If you do test the return value, the program will continue to run even though no key was found."
If I create a simple table with id and name the code below will return True (in 2013 R2 and 2015) no matter what field I select as key. In 2009 it behaves as the documentation.
keyworking := r.SETCURRENTKEY(name2);
Is this a bug or is the documentation not up to date?
From Nav 2013 R2 with the Introduction of Interactive soring feature, it is no longer required to define a Key on a table to sort data. SetCurrentKey no longer requires a Key to be created in the table.
refer the below for details
Its not a bug, seems to be the document not updated
With the introduction of Dynamics NAV 2013 R2 version interactive soring feature was introduced to Dynamics NAV. Therefore you no longer required to define a key in the table level to sort it in the run time. You can sort the data with any field.
Business Applications communities