Common mistakes we make in C/AL - Vol. 1 - Tips, Tricks & Facts #6
Hi peeps, starting a new series of posts on what are the common mistakes made by developers like us which have bad, sometimes worse, impacts on database transactions. And what the kind of coding styles we must avoid to keep the code neat and clean. And what are the DO's and DON'T's for writing C/AL code.
We gotta remember that we are not the last developers who will write a particular code somewhere in the NAV objects. There will be more developers after us who will be carrying the torch and some of them might run into some code which was written by us.
Therefore, your code must better be understandable and optimized!
For this post, I will talk about one of the most common C/AL functions which are used in everyday coding.
FIND('-'), FINDFIRST, ISEMPTY and FINDSET - When to use what and when not to use what out of these functions. I will be sharing thoughts based on my own experience and knowledge. Please share your thoughts in comments and update me and others with your thoughts on this topic.
Some posts already exist on the web comparing these 4 functions. But, there is still some space for knowledge left to share about these. I will answer common questions related to these functions as the definition of these functions can be found on MSDN. Therefore, here goes,
Do not use the following functions just to check if a table has (particular) records,
> FINDFIRST
> NOT FINDFIRST
> FIND('-')
> FINDSET
Click to share
Hi peeps, starting a new series of posts on what are the common mistakes made by developers like us which have bad, sometimes worse, impacts on database...
• 4BzSoftware Microsoft Dynamics NAV Blog
• Microsoft Dynamics NAV Team Blog
• Microsoft Dynamics NAV Community
• Mibuso Favourite Knowledge Base
Havinh Tower F2, 57 Nguyen Van Giai,
District 1, Ho Chi Minh City, Vietnam
+84 93 400 3416
support@4bzsoftware.com
Google map view
Click here to view
Please enter your email below
to receive news and offers from us