The purpose of this lesson is to help you learn iDempiere's architecture.
Architecture - Introduction
Architecture - Layers
Architecture - Context
It is important to note that context in iDempiere has some powerful features to (1) reference values based on an ID and (2) format the output. Examples include:
@Name@=A,R,S (logically equivalent to using an sql IN statement)
@#AD_Role_ID@ = 102 (note the pound sign refers to the user's session info - describing the person using the keyboard)
@AD_Org_ID.Value@ = HQ (works when evaluator.java is performing the evaluation from GridTab)
@AD_Org_ID.AD_Org_UU@ = KJLKJSLKJDLKFJSLKDJF (handy when you do not know the _ID because of Pack In offset IDs)
@C_BPartner_ID<Value>@_@Name@ (alternate way to dereference a foreign key field. This style of context is used in Window, Tab and Field => Title Logic field)
@IsSOTrx:N@ (the text after the colon is the default value if the context lookup is not successful - implemented in evaluator.java)
@SQL=SELECT to_char(date_trunc('day',now())-2, 'yyyy-MM-dd') - default a date field based on relative days
for date and time: 'yyyy-MM-dd hh:mm:ss'
@IsSOTrx:Y@=Y = shows how to default the value. This is demonstrated in System Admin role => Info Window => Business Partner => isCustomer field
@1|C_TaxCategory_ID@ = pull C_TaxCategory_ID from a specific tab; in our case, tab = 1. You can see the detailed context information by tab by clicking on upper-left logo => Error tab => View button => scroll down to the context section. When you see something like 1|0|_TabInfo_AD_Tab_ID == 100, the first number is the window, the second number is the tab. Here is more information.
There are times when you need to add information to context in a new variable. You can use Column SQL to accomplish this task. Here is an example (discussion).
Please note that there are several places in iDempiere's code base where it resolves context into values. Because there are multiple implementations, each one behaves lightly different. For example, not all implementations implement this style of reference: @AD_Org_ID.Value@ = HQ. Here are the implementation locations:
Env.parseContext(...)
MMailText.parse(...) and MMailText.parseVariable(...)
Integer and numeric fields try to default to 0. Setting the Default Logic field to Null (not using quotes) will ensure the value is empty. Here is a summary of what to try:
All Window, Tab, Field => Window Type field = "Transaction" has special behavior. This type is used for SO, PO, MR, Inv, Etc...
Transaction windows do not show all records when they are opened.
Instead, they show
All documents that are not completed, voided, reversed, or closed
All documents that have been completed, voided, reversed, or closed in the last 24 hours.
Transaction windows also include a 'Total' tip strip in the upper right corner of the window. Ex: SO Example: 1 Line - 0.00 - Total: 0.00 USD = 0.00
Encrypted vs Obscure vs Secure
Encrypted
Encrypted filed display value as ******
Do not manage change logs .
Store direct value(same as entred) store in database.
Obscure
Obscure filed use for display last 4 digit value and other digit display like below
Example :- *********1478
Manage change logs in Obscure.
Store direct value(same as entered) store in database.
Secure
Secure column store direct value(same as entered) in database
Display same value in field.
Secure content can not manage change logs.
Architecture - Window Tab Field - Tab Tab
Architecture - Window Tab Field - Field Tab
Architecture - Table and Column - Table Tab
People often ask about the Data Access Level field. Here are the details for reference.
Data Access Level at the Table and Column drives what data can be stored in the table.
Data Access Level at the Role level drives what the user can see.
All - any Client and any Org.
Client Only - only * Org of your Client (not System Client)
Client and Organization - all Orgs of your Client (not System Client)
Organization - all transactional Orgs of your Client (not System Client)
System and Client - Your Client or System Client (only * Org)
System Only - System Client (only * Org)
Architecture - Table and Column - Column Tab
Architecture - Table and Column - Reference Field
Note there is a System Administrator role => Test window that helps you understand many of the different field/column types.
What was the issue(s) regarding the fork from Adempiere to Idempiere?
What is the control structure that is in place for iDempiere development (added feature/functionality & integrations) as well as bug corrections? Jira (bitbucket)