-
Notifications
You must be signed in to change notification settings - Fork 0
Home
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 withId
andName
forDropdown key
andDropdown value
respectively - Use
Item
suffix for the maindetail
entity of a givenmaster
e.g.SalesOrderItem
- Use suffix
Entry
for ledger type of entities where make sense e.g.JournalEntry
(alternative isRecord
e.g.StockRecord
) - For all the (
Company
dependent) documents use relation to aCompany
entity by default - Use packaging project for module to maintain the dependencies