Skip to content
Nedelcho Delchev edited this page Feb 14, 2024 · 20 revisions

Welcome to the codbex-rhea wiki!

Best Practices

  • Always have an Id property as primary key
  • Always have a Name property, could be in some cases plays as a compound string calculated from other key properties
  • For Document types of entities e.g. Order, Invoice, etc. use UUID calculated property (e.g. require("sdk/utils/uuid").random())
  • For fileds like Net, VAT, Gross, etc. use calculated field option e.g. entity["Quantity"] * entity["Price"]
  • Wherever needed use weak dependency via property Reference which holds the UUID of the referenced document
  • Always prefer a type-safe approach in modelling, e.g. having separate Customer and Supplier entities instead of a single Partner entity
  • Use CamelUpperCase for perspective names (no spaces in the keys)
  • Place Master-Details entities in a separate perspective
  • Use Dropdown widget for hard dependencies with Id and Name for Dropdown key and Dropdown value respectively
  • Use Item suffix for the main detail entity of a given master e.g. SalesOrderItem
  • Use suffix Entry for ledger type of entities where make sense e.g. JournalEntry (alternative is Record e.g. StockRecord)
  • For all the (Company dependent) documents use relation to a Company entity by default
  • Use packaging project for module to maintain the dependencies
Clone this wiki locally