Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft Dynamics NAV Administration

You're reading from  Microsoft Dynamics NAV Administration

Product type Book
Published in Sep 2010
Publisher Packt
ISBN-13 9781847198761
Pages 208 pages
Edition 1st Edition
Languages
Toc

Table of Contents (15) Chapters close

Microsoft Dynamics NAV Administration
Credits
Foreword
About the Authors
About the Reviewers
1. Preface
1. Setting up the Environment for Dynamics NAV 2. Installing Dynamics NAV 3. Integrating Dynamics NAV with the Microsoft Platform 4. Securing Dynamics NAV Applications 5. Backing up and Restoring a Dynamics NAV Database 6. Performance Tuning 7. Setting up Periodic Activities, Stylesheets, and Rapid Implementation Methodology 8. Updating Objects and Virtualization with Dynamics NAV 9. Business Intelligence

Writing less expensive C/AL code for customizations


There are a few considerations to keep in mind while writing a customized C/ AL code, as poorly written code can affect the performance of the application or a business process significantly.

Retrieving data using FINDFIRST/FINDLAST/FINDSET

Using FINDFIRST instead of the following FIND('-') statement is also an inexpensive command to retrieve the first record from the recordset.

The following is the code for retrieving the first record using the FIND statement:

GLEntry.SETRANGE(...);
IF NOT GLEntry.FIND('-') THEN
MESSAGE('No entries in the GL Entry table');

The previous code can be replaced with the following code:

GLEntry.SETRANGE(...);
IF NOT GLEntry.FINDFIRST THEN
MESSAGE('No entries in the GL Entry table');

Using FINDLAST instead of the following FIND('+') is an inexpensive way to retrieve the last record from the recordset.

The following is the code for retrieving the last record using the FIND('+') statement:

GLEntry.SETRANGE(...);
IF...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime