Difference between revisions of "Creating New Window."

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
m (Creating a New Window (Simple Approach))
m (Reverted edits by Quanliu (Talk); changed back to last version by Red1)
Line 3: Line 3:
 
Here are more quicker steps in Creating a New Window which may be useful for the adempiere beginner and to those who are inexperienced with database scripts or programing languages. For a more elaborate detailing including extending the Window functionality, please refer to [[NewWindow]].
 
Here are more quicker steps in Creating a New Window which may be useful for the adempiere beginner and to those who are inexperienced with database scripts or programing languages. For a more elaborate detailing including extending the Window functionality, please refer to [[NewWindow]].
  
Before starting the client to create the window, you need to have a table in your database as target. You can use follow SQL script to create the table:
 
 
<pre>
 
CREATE TABLE table_for_test
 
(
 
    table_for_test_id numeric(10) NOT NULL,
 
 
-- start: mandatory fields
 
    ad_client_id numeric(10) NOT NULL,
 
    ad_org_id numeric(10) NOT NULL,
 
    isactive char DEFAULT 'Y' NOT NULL,
 
    created timestamp(20) DEFAULT now() NOT NULL,
 
    createdby numeric(10) NOT NULL,
 
    updated timestamp(20) DEFAULT now() NOT NULL,
 
    updatedby numeric(10) NOT NULL,
 
-- end
 
 
    info varchar(20),
 
    PRIMARY KEY (table_for_test_id)
 
);
 
</pre>
 
 
One thing I like to emphasis is that the name of the primary key HAS to be <table_name>_id. 
 
  
 
1.Access into Adempiere as System Administrator
 
1.Access into Adempiere as System Administrator
Line 46: Line 23:
 
   updatedby numeric(10) NOT NULL
 
   updatedby numeric(10) NOT NULL
 
</pre>
 
</pre>
 
  
 
These mandatory fields are not created automatically when synchronizing table with database.
 
These mandatory fields are not created automatically when synchronizing table with database.

Revision as of 02:32, 3 October 2009

Creating a New Window (Simple Approach)

Here are more quicker steps in Creating a New Window which may be useful for the adempiere beginner and to those who are inexperienced with database scripts or programing languages. For a more elaborate detailing including extending the Window functionality, please refer to NewWindow.


1.Access into Adempiere as System Administrator


2.Open Module "Table and Column"

  • Create new table
  • Create new column
  • Synchronize table with database

Make sure all mandatory fields also included in that table (ad_client_id, ad_org_id, created, createdby, updated, updatedby, isactive)

  ad_client_id numeric(10) NOT NULL,
  ad_org_id numeric(10) NOT NULL,
  isactive character(1) NOT NULL DEFAULT 'Y'::bpchar,
  created timestamp without time zone NOT NULL DEFAULT now(),
  createdby numeric(10) NOT NULL,
  updated timestamp without time zone NOT NULL DEFAULT now(),
  updatedby numeric(10) NOT NULL

These mandatory fields are not created automatically when synchronizing table with database.

3.Open Module "Window, Tab and Field"

  • Create new Window
    • Set Data access level="All"
  • Create tab and copy field from table
    • Set table=Table name that just created
    • Press "Copy Field" button
  • Rearrange the field position


4.Open Module "Menu"

  • Create new Menu
    • Choose Action="Window"
    • Select the new window from the pull down list


5.Relogin into System to view your new window.