Use this file to discover all available pages before exploring further.
iDempiere is built on a model-driven architecture where the Application Dictionary (AD) defines all metadata for the system. This approach allows extensive customization without code changes.
Display logic controls field visibility based on context:
-- Show field only when DocStatus = 'DR' (Draft)@DocStatus@='DR'-- Show field when IsSOTrx = 'Y' (Sales Transaction)@IsSOTrx@='Y'-- Show field when PaymentRule is not Cash@PaymentRule@!='B'-- Complex condition@IsSOTrx@='Y' & @DocStatus@='CO'
Read-only logic controls when fields are editable:
-- Read-only after document is processed@Processed@='Y'-- Read-only unless user is Sales Rep@#AD_Role_ID@!=1000000-- Read-only for completed documents@DocStatus@='CO' | @DocStatus@='CL'
Set default values using SQL or context variables:
-- Current date@#Date@-- Current organization@#AD_Org_ID@-- Current user@#AD_User_ID@-- SQL default@SQL=SELECT C_Currency_ID FROM C_AcctSchema WHERE C_AcctSchema_ID=@#C_AcctSchema_ID@
-- Show only active productsM_Product.IsActive='Y'-- Show products for current price listEXISTS (SELECT 1 FROM M_ProductPrice pp WHERE pp.M_Product_ID=M_Product.M_Product_ID AND pp.M_PriceList_Version_ID=@#M_PriceList_Version_ID@)-- Show business partners by typeC_BPartner.IsCustomer='Y' AND C_BPartner.IsActive='Y'
import org.compiere.model.*;import org.compiere.util.Env;import java.util.Properties;public class OrderExample { public void createOrder(Properties ctx, String trxName) { // Create new order MOrder order = new MOrder(ctx, 0, trxName); order.setC_BPartner_ID(103); // Set business partner order.setC_DocTypeTarget_ID(130); // Standard Order order.setDateOrdered(new Timestamp(System.currentTimeMillis())); order.setDatePromised(new Timestamp(System.currentTimeMillis())); order.saveEx(); // Add order line MOrderLine line = new MOrderLine(order); line.setM_Product_ID(123); // Product ID line.setQtyEntered(new BigDecimal("10")); line.setPrice(); // Calculates price from price list line.saveEx(); // Complete the order order.processIt(DocAction.ACTION_Complete); order.saveEx(); } public void queryOrders(Properties ctx, String trxName) { // Query orders using Query API List<MOrder> orders = new Query(ctx, MOrder.Table_Name, "C_BPartner_ID=? AND DocStatus=?", trxName) .setParameters(103, "CO") .setOrderBy("DateOrdered DESC") .list(); for (MOrder order : orders) { System.out.println("Order: " + order.getDocumentNo() + " Total: " + order.getGrandTotal()); } }}
Modify UI, add fields, and change behavior through metadata
Automatic Code Generation
Model classes generated automatically from dictionary
Database Independence
Abstract database layer works with PostgreSQL and Oracle
Multi-Tenancy
Client and organization isolation built into framework
Changes to the Application Dictionary should be packaged as migration scripts in the migration/ directory using the format <version>/postgresql/NNNN_description.sql.