Monday, 9 November 2015

Best Practices for Table Methods


Following are the types of Table Methods:

  • Application-defined methods – created by a developer specifically for a particular table.
  • System-defined methods – automatically available on every table. These methods are inherited from the xRecord system class.

Application-Defined Methods
Use the properties available on tables and table fields rather than creating code for the same purpose. If you do need to create a method on a table, it must be directly related to that table.
If a table has a unique key, create the following methods:

  1. staticfind
  2. staticexist
  3. static checkExist
  4. static txtNotExist

By default, these methods run on both the client and the server. You can state this explicitly in the method declaration (client server), but don't specify a single tier (client or server). It is a best practice to create these methods on tables. A best practices error does not occur if the method is not called.

No comments:

Post a Comment