How to Create Screen/Window in ADempiere
2012-08-10 11:54
381 查看
1 – Create database table by executing your script. For example:
Following are the important point about database table:
It is better to create primary-key (PK). The PK name should be: [table name] + “_ID” and type should be NUMBER if you want to leverage with full ADempiere AD features.
Along with PK there should be 7 other fields: •AD_CLIENT_ID •AD_ORG_ID •ISACTIVE •CREATED •CREATEDBY•UPDATED •UPDATEDBY
2 – Activating the new table in the AD
Now we have to import that new table in ADempiere - here we again call it a Table :)
· Login as System administrator in ADempiere. The user id and password is: SuperUser/System
· Open ‘Table and Column’ window
· Create a new record
· Type into DB Table Name, the name of the newly created DB-table i.e ITC_EMPLOYEE
· Set ‘Data Access Level’ to ‘All’ and check the item ‘Maintain Change Log’
· Click on the button Create Columns from DB.
o This creates for each db-tablecolumn a corresponding AD Column.
o Check the automatic created Columns, especially the ID references (e.g. Number instead of Integer)
Now you can say that we have a physical database table that we created in step 1 & and we have an ADempiere logical table created in Step 2. First one is DB table and second one is AD table.
3 –Create an ADempiere window
· Create a new entry in the ‘Window Tab & Field’ with the name ITC_EMPLOYEE . In the next tab i.e. ‘Tab’ create a new entry with the name EMPLOYEE and select ‘ITC_EMPLOYEE’ as it's table.
· Use the button ‘Create Fields’ to create fields for all columns of the table. In the tab ‘Field Sequence’ you can choose the sequence of the fields in the new window and in the tab ‘Field’ you can select some view-related attributes. Set the read-only flag for ‘ITC_EMPLOYEE _ID’ (the id should be unchangeable).
· To change the display properties (read-only, displayed or mandatory) of any fields see Display properties of columns and fields for more details.
4 – Create a MENU and attach your window with it. It's for your exercise.
CREATE TABLE "ITC_EMPLOYEE" ( "ITC_EMPLOYEE_ID" NUMBER(10,2) NOT NULL ENABLE, "NAME" VARCHAR2(50) NOT NULL ENABLE, "FATHERNAME" VARCHAR2(50), "AD_CLIENT_ID" NUMBER(10,0) NOT NULL ENABLE, "AD_ORG_ID" NUMBER(10,0) NOT NULL ENABLE, "ISACTIVE" CHAR(1) DEFAULT 'Y' NOT NULL ENABLE, "CREATED" DATE DEFAULT SYSDATE NOT NULL ENABLE, "CREATEDBY" NUMBER(10,0) NOT NULL ENABLE, "UPDATED" DATE DEFAULT SYSDATE NOT NULL ENABLE, "UPDATEDBY" NUMBER(10,0) NOT NULL ENABLE, CONSTRAINT "ITC_EMPLOYEE_PK" PRIMARY KEY ("ITC_EMPLOYEE_ID") ENABLE );
Following are the important point about database table:
It is better to create primary-key (PK). The PK name should be: [table name] + “_ID” and type should be NUMBER if you want to leverage with full ADempiere AD features.
Along with PK there should be 7 other fields: •AD_CLIENT_ID •AD_ORG_ID •ISACTIVE •CREATED •CREATEDBY•UPDATED •UPDATEDBY
2 – Activating the new table in the AD
Now we have to import that new table in ADempiere - here we again call it a Table :)
· Login as System administrator in ADempiere. The user id and password is: SuperUser/System
· Open ‘Table and Column’ window
· Create a new record
· Type into DB Table Name, the name of the newly created DB-table i.e ITC_EMPLOYEE
· Set ‘Data Access Level’ to ‘All’ and check the item ‘Maintain Change Log’
· Click on the button Create Columns from DB.
o This creates for each db-tablecolumn a corresponding AD Column.
o Check the automatic created Columns, especially the ID references (e.g. Number instead of Integer)
Now you can say that we have a physical database table that we created in step 1 & and we have an ADempiere logical table created in Step 2. First one is DB table and second one is AD table.
3 –Create an ADempiere window
· Create a new entry in the ‘Window Tab & Field’ with the name ITC_EMPLOYEE . In the next tab i.e. ‘Tab’ create a new entry with the name EMPLOYEE and select ‘ITC_EMPLOYEE’ as it's table.
· Use the button ‘Create Fields’ to create fields for all columns of the table. In the tab ‘Field Sequence’ you can choose the sequence of the fields in the new window and in the tab ‘Field’ you can select some view-related attributes. Set the read-only flag for ‘ITC_EMPLOYEE _ID’ (the id should be unchangeable).
· To change the display properties (read-only, displayed or mandatory) of any fields see Display properties of columns and fields for more details.
4 – Create a MENU and attach your window with it. It's for your exercise.
相关文章推荐
- How to Create Custom Window Title in Android
- How to create a user in PostgreSQL
- How to create a repository in Github with Eclipse?
- How to create a Plone Blog in 5 steps
- QT28 how to display a splash screen in qt
- How to Create a Secure Login Script in PHP and MySQL
- How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?
- how to clear screen in python shell
- How to create .gitignore file in Windows Explorer
- How to Create a Notify Icon in C# without a form
- How to create an Excel sheet or chart in VC?
- How to create a zip file in NetSuite SuiteScript 2.0 如何在现有SuiteScript中创建和下载ZIP压缩文档
- How to Create a Second Level GridView in ASP.NET
- How To Create a Dynamic Web 2.0 Brochure Site in an Hour
- How To Create a Child Domain in Active Directory and Delegate the DNS Namespace to the Child Domain
- How to create Function/Procedure in Oracle?
- How to "enalbe mouse integration" and make screen display fully in Oracle VM VirtualBox in Ubuntu
- [zz]How to Create Sample Data in Blend 3
- How to create and execute JAR file in Java – Command line Eclipse Netbeans
- How to create patch file in Linu…