30 additional methods to the Global class

Global class is a standard class that contains a lot of small static functions. This post describes additional functions that extend it. To avoid using prefixes, all functions were added into the separate static class DEV. It exists in the DEVCommon model. As common practice, you can copy this class into your application as it is, or rename it according to your model name(e.g. ABC)

DEV class methods

buf2Buf

Copies one cursor to another using field names(standard buf2Buf uses IDs). So you can copy values between different tables

getFormRunFromFormArgs

queryHasRecord

Checks, that the query has a record. The common usage scenario is when you need to create a custom lookup for the field. In this case, you create a query for this lookup, create the lookup based on this query and add a check into the validateWrite() method to check that the entered value(user can enter the value using the manual entry) exists in this query