If my job were to rewrite the function above, there are two things that I would definitely do differently. One is just a matter of convention, the other would strongly improve the readability (=maintainability) of the code.
Posted inDynamics NAV & BC Tips & tricks