Passing Records and RecordRefs via Variants

As developers in an ever more repeatable world we should strive to write code in ways that make it as flexible and generic as we possibly can. A trick I use is too pass things around in ever more generic ways by using Variants.

A good example can be seen below where the function ReturnRecordIDasText function takes either a Record or a RecordRef as input and then returns the RECORDID as text.

Bron : Thinking NAV – Thinking Differently
Lees meer…

The power of Variants

This blogpost of Arend Jan Kauffman reminded me of a topic that I wanted to write a very long time now. Namely working with Variants. Sometimes I get the remark: “what the hell are they useful for? “. And to be honest: Variants could be bloody useful in some cases. Cases to make stuff even more generic then only working with RecordRef, FieldRef and such. The keyword is “Generic” here.

Bron : Waldo’s Blog
Lees meer…