I'm slogging through the C/SIDE Solution Development book. One of the interesting "learning opportunities" I have while doing so is this: my book is for 2009, but I'm using 2013 for my "sandbox", so there are more than a few discrepancies between the map and the terrain, as I'm sure you can imagine.
One such discrepancy that I've encountered is in the "Table Locking" discussion on page 4-13. I delved into the LockTable documentation, and I discovered that the 2009 version has two parameters, but the 2013 version has none.
All of that leads me to my question - how do you accomplish the VersionCheck functionality in 2013?
0
Answers
In developer environment you can click on "Help" - "About Microsoft Dynamics NAV development environment" and it will display the info.
http://ssdynamics.co.in
In NAV 2009, Record.LOCKTABLE took two Boolean parameters.
The first specified how to handle the situation where the record is locked by another process: "true" means "wait until the table is unlocked", "false" means "throw a run-time error".
The second specified whether to perform version checking on a record. Say you need to read a record, do some time-consuming calculations, and then write the results back to that record. The "VersionCheck" parameter allows you to leave the record unlocked during those calculations. If you set the parameter to "true" then the data in the record at "write time" is compared to the previous read, and NAV throws an error if the two versions differ.
Here's the link to the MSDN documentation.http://msdn.microsoft.com/en-us/library/dd301298.aspx
Neither of these parameters exists in NAV 2013. So how do you accomplish these bits of logic in 2013?
The Wait and VersionCheck parameters for the LockTable function still exist in 2013. They were just omitted from the internal help system and the MSDN documentation page.
Oops.