SlideShare a Scribd company logo
OSS ERP Solutions Co., Ltd. All Right Reserved.
JPIERE-0158: Delete Client and Initialize Client
JPiere is plugins of iDempiere
& distributions of iDempiere for Japan.
OSS ERP Solutions Co., Ltd. All Right Reserved. 1
Overview
 Delete Client and Initialize Client
You will delete records in a Client when you perform Delete Client and Initialize
Client process. JPiere provides 5 ways that delete records as follows.
 Delete a Client
 Delete a Client Transactions
 Delete All Clients Transactions
 Initialize a Client
 Custom Delete
Kinds of Delete Client and Initialize Client way
"Delete a Client“ deletes all data in a client that you select.
“Delete a Client Transactions” deletes all transaction data in a client that you select.
“Delete All Clients Transactions” deletes all transaction data in all client.
“Initialize a Client” can delete transaction data and master data. All transaction data
is deleted basically. And master data is deleted by “Definition of Delete Profile”.
Delete a Client
Delete a Client Transactions
Delete All Clients Transactions
Initialize a Client
“Custom Delete” delete data according to “Definition of Delete Profile”. You can
delete a Client data flexibly.
Custom Delete
Kinds of "Delete Client and Initialize Client“ ways as follows.
OSS ERP Solutions Co., Ltd. All Right Reserved. 2
Overview
About “Delete Profile”
“Delete Client and Initialize Client” process deletes data according by “Definition of
Delete Profile”. "Delete Client and Initialize Client“ process can delete data flexibly
by using “Delete Profile”.
“Definition of Delete Profile” is configuration setting of “Delete Profile”.
Relations of “Delete a Client” and “Delete Profile”
“Delete a Client” don’t use “Delete Profile”. “Delete a Client” need not to customize
because “Delete a Client” deletes all data in a client.
Relations of “Delete (a/All) Client(s) Transactions” and “Delete Profile”
You can add delete tables to use “Delete Profile” at “Delete a Client Transactions”
and “Delete All Clients Transactions”.
Relations of “Initialize a client” and “Delete Profile”
“Initialize a Client” can delete transaction data and master data. All transaction data
is deleted basically. And master data is deleted by “Definition of Delete Profile”.
Relations of “Custom Delete” and “Delete Profile”
“Custom Delete” delete data according to “Definition of Delete Profile”. You can
delete a Client data flexibly.
OSS ERP Solutions Co., Ltd. All Right Reserved. 3
概要
About “Transaction Tables” and “Initialize Tables”
You need understand "Transaction Tables" and "Initialize Tables" for performing
"Delete Client and Initialize Client“ process correctly.
Transaction Tables are table that have document data like a order. Transaction Table
defines at Initialize Client and Delete Client process. You can confirm Transaction
Tables at “Delete Tables Confirmation Report”.
Transaction data in Transaction Tables is deleted basically except “Custom Delete”.
About Transaction Tables
About Initialize Tables
Initialize Tables are table that have master data like a Business Partner and a
Product. You can confirm Initialize Tables at “Delete Tables Confirmation Report”.
Initialize Tables is used by “Initialize a Client”. In “Initialize a Client”, “Initialize
Client and Delete Client” process do not delete data that is contained “Initialize
Tables” if “Initialize Table” do not define in Delete Profile. On the other hand, “Delete
Client and Initialize Client” process deletes all data that is not contained “Initialize
Table” and “Definition of Delete Profile”.
 “Delete Client and Initialize Client” process defines “Transaction Tables”
and ”Initialize Tables”. You can confirm it at “Delete Tables Confirmation
Report”.
 You can customize Delete Client and Initialize Client process flexibly by using
“Delete Profile”. “Definition of Delete Profile” is configuration setting of “Delete
Profile”.
 Transaction data in Transaction Tables is deleted basically except “Custom
Delete”.
 “In “Initialize a Client”, “Delete Client and Initialize Client” process do not delete
data that is contained “Initialize Tables” if “Initialize Table” do not define in
Delete Profile.
 “Delete Client and Initialize Client” process deletes all data that is not contained
“Initialize Table” and “Definition of Delete Profile”.
Points of understand “Delete Client and Initialize Client”
OSS ERP Solutions Co., Ltd. All Right Reserved. 4
Overview
Other Overview and Instructions
You can not delete data that is in System Client.
Please back up data before perform “Initialize Client and Delete Client” process
“Initialize Client and Delete Client” process delete session log and change log except
System Client.
You can perform “Initialize Client and Delete Client” process System Client only.
“Initialize Client and Delete Client” process delete data that Import
Tables(I_TableName) and Temporary Tables(T_TableName).
“Super User” can not perform Delete Client and initialize Client Process. Please use
“System User”
Common Error
“Delete Client and Initialize Client Process” invalid Foreign key constraint before
delete. And valid Foreign key Constraint after delete. When valid Foreign key, You
may get Error of Foreign key constraint. Please check log and Delete Profile, data in
data base.
Error of Foreign key Constraint
If you configure to set Null at Delete Profile, You may get Error of Not Null
Constraint. Please check Delete Profile if you get Error of Not Null Constraint.
Error of Not Null Constraint
Data base is PostgreSQL only.
Please reboot iDempiere server after delete.
OSS ERP Solutions Co., Ltd. All Right Reserved. 5
Delete Client and Initialize Client Process
Delete Client and Initialize Client Process
Parameters
Delete Client and Initialize Client Process
1000000Client ID
Save Parameters ▼
Delete or Initialize Client Delete a Client Transactions ▼
Truncate
Delete Profile ▼
You have to enter AD_Client_ID that you want to delete.
Client ID
You have to choice a way that delete records as follows.
 Delete a Client … "Delete a Client" deletes all data in a client that you select.
 Delete a Client Transactions … "Delete a Client Transactions" deletes all transaction data in a
client that you select.
 Delete All Clients Transactions … "Delete All Clients Transactions" deletes all transaction data
in all client.
 Initialize Client … "Initialize a Client" can delete transaction data and master data. All
transaction data is deleted basically. And master data is deleted by "Definition of Delete
Profile".
 Custom Delete … "Custom Delete" delete data according to "Definition of Delete Profile". You
can delete a Client data flexibly.
Delete or Initialize Client
Truncate
If you selected “Delete All Clients Transactions”, Flag of Truncate is displayed. If you tick the
flag, Delete Client and Initialize Client process deletes data by using “Truncate”.
 Delete Client and Initialize Client Process
If you perform "Delete Client and Initialize Client Process“, You can delete client and
Initialize client.
Get Log of Update SQL 0
OSS ERP Solutions Co., Ltd. All Right Reserved. 6
Delete Client and Initialize Client Process
Delete Profile
You can select Delete profile except “Delete a Client”.
Get Log of Update SQL 0
If you tick this flag, Delete Client and Initialize Client process get the all log of SQL that update
and delete records.
Check of Parameters
You can not perform “Super User”. Please use “System User”.
Check of user
Check of Client ID
If you want to perform "Delete All Clients Transactions", Please Enter 0 to Client ID. Else You
can not enter 0 to Client ID.
Check of Delete Profile
You have to enter a "Delete Profile", When you selected "Initialize a Client" or "Custom Delete".
OSS ERP Solutions Co., Ltd. All Right Reserved. 7
Delete Client and Initialize Client Process
Flow of Delete Client and Initialize Client process.
Process flow of "Delete a Client"
Step1:Delete Data of “Transaction Tables”
“Delete a Client“ deletes all data in a client that you select.
Step2:Delete Data of Not “Transaction Tables”
Step3:Delete records that refer to delete Client.
◆Step4:Reset count of Primary key ID.
Reset count of Primary key ID except Prefix of Table Name is “AD_” and current ID less than
1000000.
Process flow of "Delete a Client Transactions"
“Custom Delete” delete data according to “Definition of Delete Profile”. It is handled in
Sequence number.
OSS ERP Solutions Co., Ltd. All Right Reserved. 8
Delete Client and Initialize Client Process
Process flow of "Delete a Client Transactions"
Delete a Client Transactions deletes all transaction data in a client that you select.
Step1:Delete Data of "Transaction Tables"
Step2:Set null records that refer "Transaction Tables"
Step3:Reset count of Document number
Step4:Process of Delete Profile
◆Step5:Reset count of Primary key ID
Reset count of Primary key ID to Transaction Tables except Prefix of Table Name is “AD_” and
current ID less than 1000000.
OSS ERP Solutions Co., Ltd. All Right Reserved. 9
Delete Client and Initialize Client Process
Process flow of "Delete All Clients Transactions"
Process flow of "Delete All Clients Transactions" is same as Process flow of "Delete a
Client Transactions" basically.
But be careful to tick TRUNCATE flag. TRUNCATE perform with option of "CASCADE"
and ignore WHERE clause of Delete Profile. All records that table is defined in Delete
Profile is deleted.
OSS ERP Solutions Co., Ltd. All Right Reserved. 10
Delete Client and Initialize Client Process
Process flow of "Initialize a Client"
Initialize a Client can delete transaction data and master data. All transaction data is
deleted basically. And master data is deleted by Definition of Delete Profile.
Step1:Delete Data of "Transaction Tables".
Step2:Set null records that refer "Transaction Tables".
Step3:Reset count of Document number.
Step4:Delete all data that table is not contained “Initialize Table” and
“Definition of Delete Profile”.
Step5:Process of Delete profile.
◆Step6:Reset count of Primary key ID.
Reset count of Primary key ID except Prefix of Table Name is “AD_” and current ID less than
1000000.
OSS ERP Solutions Co., Ltd. All Right Reserved. 11
Delete Profile
Delete Profile
Tab of Delete Profile
Delete Profile [ #/#]
System
Delete Profile
Client* *Oranization*
1000000Search key
testName*
Description
 Active
Value = ‘HQ’AD_Org_ID Where
Description= ‘default’AD_Role_ID Where
Description= ‘default’AD_User_ID Where
Initialize ClientDelete or Initialize Client* ▼
You can select next 4 ways that delete or initialize client.
 Delete a Client Transactions
 Delete All Clients Transactions
 Initialize Client
 Custom Delete
Delete or Initialize Client
Description= ‘default’C_BPartner_ID Where
M_Product_ID < 0M_Product_ID Where
Modify Client name
 Delete Profile
You can customize “Delete Client and Initialize Client Process” flexibly by using
“Delete Profile”. “Definition of Delete Profile” is configuration setting of “Delete
Profile”.
OSS ERP Solutions Co., Ltd. All Right Reserved. 12
Delete Profile
AD_Org_ID-WHERE
This field is displayed when you select Initialize a Client. You can input default organization
condition. If you keep blank this field, Organizations are not deleted.
AD_Role_ID-WHERE
This field is displayed when you select Initialize a Client. You can input default Role condition. If
you keep blank this field, Roles are not deleted.
AD_User_ID-WHERE
This field is displayed when you select Initialize a Client. You can input default User condition. If
you keep blank this field, Users are not deleted. If you delete user, Delete Client and Initialize
Client Process updates "CreatedBy" and "UpdatedBy" at "SuperUser".
C_BPartner_ID-WHERE
This field is displayed when you select Initialize a Client. You can input default Business partner
condition. If you keep blank this field, Business Partners are not deleted.
M_Product_ID-WHERE
This field is displayed when you select Initialize a Client". You can input default Product
condition. If you keep blank this field, Products are not deleted.
This field is displayed when you select Initialize a Client. You can input new Client Name in
stead of Initialized old Client Name.
Modify Client name
OSS ERP Solutions Co., Ltd. All Right Reserved. 13
Delete Profile
Tab of Custom Delete Profile
Delete Profile > Custom Delete Profile [ #/#]
System
Delete Profile
Client* *Organization*
Description
 Active
Sql WHERE
10Sequence*
Table*
testDelete Profile*
Delete data not use
Delete data not use
If you tick on this check box, Delete Client and Initialize Process deletes records that is not
referenced by other records.
Treat of Foreign Key ▼ 0Foreign key ID
Table
Delete Table.
Sql WHERE
You can define a remain record condition. If you keep blank this field, Data in this table is not
deleted(All records remain).
Sequence
Process order.
Tab of “Custom Delete Profile” can define Delete profile flexibly. Important definition that need
to explain is Treat of Foreign key. You can define a way to process data that refer this table
records.
【Caution】Judgment of the records that are using now or not
This flag can not judge correclty if Foreign Key use below reference.
ID / Location / Locator / Account / Assignment / PAttribute / Image / Chart / Color
OSS ERP Solutions Co., Ltd. All Right Reserved. 14
Delete Profile
Treat of Foreign Key
Policy of Treat of Foreign Key.
 Set NULL ---> If Foreign Key has refer to delete records, set Null except define of Custom
Delete Profile Line.
 Set Value ---> If Foreign Key has refer to delete records, set Value except define of Custom
Delete Profile Line.
 Delete Records ---> If Foreign Key has refer to delete records, Delete the records except
define of Custom Delete Profile Line.
 Mandatory = true ? Delete : NULL ---> If Column of Foreign Key is Mandatory, Delete the
record. If Column of Foreign Key is not Mandatory, set null to the column.
 Mandatory = true ? Delete : Value ---> If Column of Foreign Key is Mandatory, Delete the
record. If Column of Foreign Key is not Mandatory, set Value to the column.
 Mandatory = true ? Value : NULL ---> If Column of Foreign Key is Mandatory, set Value to
the column. If Column of Foreign Key is not Mandatory, set null to the column.
 Mandatory = true ? Value : Delete ---> If Column of Foreign Key is Mandatory, set Value
to the column. If Column of Foreign Key is not Mandatory, Delete the record.
Foreign Key ID
If you select "Set Value" at field of Treat of Foreign Key. Delete Client and Initialize process put
this value into Foreign Key.
Create Custom Delete Profile Line
if you use process of Create Custom Delete Profile Line, you can create custom delete profile
lines that refer this table.
Precautions for use of Create Custom Delete Profile Line Process
・This process can not create line if there are lines already.
・This process can not create line if Foreign Key refer to table by using as follow reference
and name of column is not "ReferredTableName_ID".
Location / Locator / Account / Assignment / PAttribute / Image / Chart / Color
OSS ERP Solutions Co., Ltd. All Right Reserved. 15
Delete Profile
Tab of Custom Delete Profile Line
[ # /# ]
System
Delete Profile
Client* *Organization*
Description
 Active
10Sequence*
Table*
Custom Delete Profile*
Link Column* ▼
▼Treat of Foreign Key*
Treat of Foreign Key
Policy of Treat of Foreign Key.
 Set NULL ---> If Foreign Key has refer to delete records, Set null to this Foreign Key.
 Set Value ---> If Foreign Key has refer to delete records, Set Value to this Foreign Key.
 Delete Records ---> If Foreign Key has refer to delete records, Delete the records.
0Foreign Key ID
If you want to configuration that is irregular policy treat of foreign key, Please create Custom
Delete Profile Lines.
Table
Table that have Foreign Key refer to parent table record.
Sequence
Process order.
Link Column
Column that refer to parent table record.
Foreign key ID
If you select Set Value at field of Treat of Foreign Key. Delete Client and Initialize Process put
this value into Foreign Key.
Delete Profile > Custom Delete Profile > Custom Delete Profile Line
OSS ERP Solutions Co., Ltd. All Right Reserved. 16
Delete Client and Initialize Client Confirmation Reports
Delete Tables Confirmation Report
Parameters
Delete Tables Confirmation Report
Save Parameters ▼
Delete Profile* ▼
 Delete Client and Initialize Client Confirmation Reports
This report can list of tables that is defined by Delete Profile. You can confirm Delete way per
Table.
 Display All Tables
Report(Excel)
Please refer description column. That column display information of delete way.
OSS ERP Solutions Co., Ltd. All Right Reserved. 17
Delete Client and Initialize Client Confirmation Reports
Table Relations Confirmation Report
Parameters
Delete Tables Confirmation Report
Save Parameters ▼
Referenced Table* ▼
This report can list information of foreign key column.
Report(Excel)
This report can list information of foreign key column.
Case of tables that is not able to contain this list
Case of tables that is not able to contain this list
ID / Location / Locator / Account / Assignment / PAttribute / Image / Chart / Color
OSS ERP Solutions Co., Ltd. All Right Reserved. 18
Set Up
Pack in 2Pack.zip under META-INF folder
 Set up Delete Client and Initialize Client
This report can list of tables that is defined by Delete Profile. You can confirm Delete way per
Table.
2Pack will create the 2 windows and 2 Reports, 1 Process.
 Delere Profile(Window)
 Delere Client and Initialize Client Log(Window)
 Delere Tables Confirmation Report(Report)
 Table Relations Confirmation Report(Report)
 Delere Client and Lnitialize Client Process(Process)
You can create Table from DDL that is in SQL-DDL folder. If you can't pack in, please
create table from DDL as follows.
 JPIERE-0158-JP_DeleteProfile.txt
 JPIERE-0158-JP_CustomDeleteProfile.txt
 JPIERE-0158-JP_CustomDeleteProfileLine.txt
 JPIERE-0158-T_DeleteClientLogJP.txt
Apply process of "Create Custom Delete Profile Line" to Tab of
Custom Delete Profile
After pack in 2Pack.zip, please apply process of Create Custom Delete Profile Line to Tab of
Custom Delete Profile.
OSS ERP Solutions Co., Ltd. All Right Reserved. 19
http://www.oss-erp.co.jp/
We can support business challenges of your company
Quickly and at Low cost by using open source.
We are Solution Provider of OSS ERP and Distributor of OSS ERP

More Related Content

PPTX
JPiere Overview
PPTX
JPIERE-0098:Matrix Window
PPTX
Warranty management system
PDF
How_Do_I_Manage_the_ACT_PCT_and_CCT
DOCX
Retail headquarters releasenotes
PPTX
JPIERE-0110:Infromation Gadget
PPTX
JPIERE-0153:検収基準売上計上
PPTX
JPIERE-0111:Simple Input Window
JPiere Overview
JPIERE-0098:Matrix Window
Warranty management system
How_Do_I_Manage_the_ACT_PCT_and_CCT
Retail headquarters releasenotes
JPIERE-0110:Infromation Gadget
JPIERE-0153:検収基準売上計上
JPIERE-0111:Simple Input Window

More from Hideaki Hagiwara (20)

PPTX
JPiere-0363 契約管理
PPTX
JPIERE-0364:契約管理と計上伝票による 費用収益の認識と連結会計への応用
PPTX
JPiere-Doc ピボットウィンドウ - 操作と設定
PPTX
JPiereの活用法(SIerの皆様へ)
PPTX
JPiere-Doc 在庫移動伝票
PPTX
JPiere-Doc_在庫引当管理
PPTX
JPiere 組織倉庫と物理倉庫によるセグメント別在庫管理
PPTX
JPiere - 支払条件マスタ編
PPTX
JPiere_入金データ取込と債権との自動照合編
PPTX
JPiere 倉庫と保管場所と保管場所タイプの定義例
PPTX
JPiere 共有倉庫とセグメント別在庫管理検討資料
PPTX
JPiere説明書-ボリュームテスト編
PPTX
JPiere-会計管理概要
PPTX
JPiereドキュメント - 購買管理概要
PPTX
JPiere 伝票の基礎知識
PPTX
JPiere トップ画面 説明
PPTX
JPiere - 販売管理概要
PPTX
JPiere - ウィンドウ(標準入力画面)の基本操作
PPTX
JPiereのログイン
PDF
JPiereサポーター制度の説明資料
JPiere-0363 契約管理
JPIERE-0364:契約管理と計上伝票による 費用収益の認識と連結会計への応用
JPiere-Doc ピボットウィンドウ - 操作と設定
JPiereの活用法(SIerの皆様へ)
JPiere-Doc 在庫移動伝票
JPiere-Doc_在庫引当管理
JPiere 組織倉庫と物理倉庫によるセグメント別在庫管理
JPiere - 支払条件マスタ編
JPiere_入金データ取込と債権との自動照合編
JPiere 倉庫と保管場所と保管場所タイプの定義例
JPiere 共有倉庫とセグメント別在庫管理検討資料
JPiere説明書-ボリュームテスト編
JPiere-会計管理概要
JPiereドキュメント - 購買管理概要
JPiere 伝票の基礎知識
JPiere トップ画面 説明
JPiere - 販売管理概要
JPiere - ウィンドウ(標準入力画面)の基本操作
JPiereのログイン
JPiereサポーター制度の説明資料
Ad

Recently uploaded (20)

PDF
Types of control:Qualitative vs Quantitative
DOCX
Euro SEO Services 1st 3 General Updates.docx
PPTX
HR Introduction Slide (1).pptx on hr intro
PPTX
Probability Distribution, binomial distribution, poisson distribution
PPTX
5 Stages of group development guide.pptx
PDF
Stem Cell Market Report | Trends, Growth & Forecast 2025-2034
PDF
Roadmap Map-digital Banking feature MB,IB,AB
PDF
20250805_A. Stotz All Weather Strategy - Performance review July 2025.pdf
PPTX
New Microsoft PowerPoint Presentation - Copy.pptx
PDF
Training And Development of Employee .pdf
PPTX
Amazon (Business Studies) management studies
PDF
COST SHEET- Tender and Quotation unit 2.pdf
PDF
How to Get Funding for Your Trucking Business
PDF
A Brief Introduction About Julia Allison
PDF
DOC-20250806-WA0002._20250806_112011_0000.pdf
DOCX
unit 2 cost accounting- Tender and Quotation & Reconciliation Statement
PDF
Reconciliation AND MEMORANDUM RECONCILATION
PDF
MSPs in 10 Words - Created by US MSP Network
PPTX
Lecture (1)-Introduction.pptx business communication
PPTX
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
Types of control:Qualitative vs Quantitative
Euro SEO Services 1st 3 General Updates.docx
HR Introduction Slide (1).pptx on hr intro
Probability Distribution, binomial distribution, poisson distribution
5 Stages of group development guide.pptx
Stem Cell Market Report | Trends, Growth & Forecast 2025-2034
Roadmap Map-digital Banking feature MB,IB,AB
20250805_A. Stotz All Weather Strategy - Performance review July 2025.pdf
New Microsoft PowerPoint Presentation - Copy.pptx
Training And Development of Employee .pdf
Amazon (Business Studies) management studies
COST SHEET- Tender and Quotation unit 2.pdf
How to Get Funding for Your Trucking Business
A Brief Introduction About Julia Allison
DOC-20250806-WA0002._20250806_112011_0000.pdf
unit 2 cost accounting- Tender and Quotation & Reconciliation Statement
Reconciliation AND MEMORANDUM RECONCILATION
MSPs in 10 Words - Created by US MSP Network
Lecture (1)-Introduction.pptx business communication
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
Ad

JPIERE-0158:Delete Client and Initialize Client

  • 1. OSS ERP Solutions Co., Ltd. All Right Reserved. JPIERE-0158: Delete Client and Initialize Client JPiere is plugins of iDempiere & distributions of iDempiere for Japan.
  • 2. OSS ERP Solutions Co., Ltd. All Right Reserved. 1 Overview  Delete Client and Initialize Client You will delete records in a Client when you perform Delete Client and Initialize Client process. JPiere provides 5 ways that delete records as follows.  Delete a Client  Delete a Client Transactions  Delete All Clients Transactions  Initialize a Client  Custom Delete Kinds of Delete Client and Initialize Client way "Delete a Client“ deletes all data in a client that you select. “Delete a Client Transactions” deletes all transaction data in a client that you select. “Delete All Clients Transactions” deletes all transaction data in all client. “Initialize a Client” can delete transaction data and master data. All transaction data is deleted basically. And master data is deleted by “Definition of Delete Profile”. Delete a Client Delete a Client Transactions Delete All Clients Transactions Initialize a Client “Custom Delete” delete data according to “Definition of Delete Profile”. You can delete a Client data flexibly. Custom Delete Kinds of "Delete Client and Initialize Client“ ways as follows.
  • 3. OSS ERP Solutions Co., Ltd. All Right Reserved. 2 Overview About “Delete Profile” “Delete Client and Initialize Client” process deletes data according by “Definition of Delete Profile”. "Delete Client and Initialize Client“ process can delete data flexibly by using “Delete Profile”. “Definition of Delete Profile” is configuration setting of “Delete Profile”. Relations of “Delete a Client” and “Delete Profile” “Delete a Client” don’t use “Delete Profile”. “Delete a Client” need not to customize because “Delete a Client” deletes all data in a client. Relations of “Delete (a/All) Client(s) Transactions” and “Delete Profile” You can add delete tables to use “Delete Profile” at “Delete a Client Transactions” and “Delete All Clients Transactions”. Relations of “Initialize a client” and “Delete Profile” “Initialize a Client” can delete transaction data and master data. All transaction data is deleted basically. And master data is deleted by “Definition of Delete Profile”. Relations of “Custom Delete” and “Delete Profile” “Custom Delete” delete data according to “Definition of Delete Profile”. You can delete a Client data flexibly.
  • 4. OSS ERP Solutions Co., Ltd. All Right Reserved. 3 概要 About “Transaction Tables” and “Initialize Tables” You need understand "Transaction Tables" and "Initialize Tables" for performing "Delete Client and Initialize Client“ process correctly. Transaction Tables are table that have document data like a order. Transaction Table defines at Initialize Client and Delete Client process. You can confirm Transaction Tables at “Delete Tables Confirmation Report”. Transaction data in Transaction Tables is deleted basically except “Custom Delete”. About Transaction Tables About Initialize Tables Initialize Tables are table that have master data like a Business Partner and a Product. You can confirm Initialize Tables at “Delete Tables Confirmation Report”. Initialize Tables is used by “Initialize a Client”. In “Initialize a Client”, “Initialize Client and Delete Client” process do not delete data that is contained “Initialize Tables” if “Initialize Table” do not define in Delete Profile. On the other hand, “Delete Client and Initialize Client” process deletes all data that is not contained “Initialize Table” and “Definition of Delete Profile”.  “Delete Client and Initialize Client” process defines “Transaction Tables” and ”Initialize Tables”. You can confirm it at “Delete Tables Confirmation Report”.  You can customize Delete Client and Initialize Client process flexibly by using “Delete Profile”. “Definition of Delete Profile” is configuration setting of “Delete Profile”.  Transaction data in Transaction Tables is deleted basically except “Custom Delete”.  “In “Initialize a Client”, “Delete Client and Initialize Client” process do not delete data that is contained “Initialize Tables” if “Initialize Table” do not define in Delete Profile.  “Delete Client and Initialize Client” process deletes all data that is not contained “Initialize Table” and “Definition of Delete Profile”. Points of understand “Delete Client and Initialize Client”
  • 5. OSS ERP Solutions Co., Ltd. All Right Reserved. 4 Overview Other Overview and Instructions You can not delete data that is in System Client. Please back up data before perform “Initialize Client and Delete Client” process “Initialize Client and Delete Client” process delete session log and change log except System Client. You can perform “Initialize Client and Delete Client” process System Client only. “Initialize Client and Delete Client” process delete data that Import Tables(I_TableName) and Temporary Tables(T_TableName). “Super User” can not perform Delete Client and initialize Client Process. Please use “System User” Common Error “Delete Client and Initialize Client Process” invalid Foreign key constraint before delete. And valid Foreign key Constraint after delete. When valid Foreign key, You may get Error of Foreign key constraint. Please check log and Delete Profile, data in data base. Error of Foreign key Constraint If you configure to set Null at Delete Profile, You may get Error of Not Null Constraint. Please check Delete Profile if you get Error of Not Null Constraint. Error of Not Null Constraint Data base is PostgreSQL only. Please reboot iDempiere server after delete.
  • 6. OSS ERP Solutions Co., Ltd. All Right Reserved. 5 Delete Client and Initialize Client Process Delete Client and Initialize Client Process Parameters Delete Client and Initialize Client Process 1000000Client ID Save Parameters ▼ Delete or Initialize Client Delete a Client Transactions ▼ Truncate Delete Profile ▼ You have to enter AD_Client_ID that you want to delete. Client ID You have to choice a way that delete records as follows.  Delete a Client … "Delete a Client" deletes all data in a client that you select.  Delete a Client Transactions … "Delete a Client Transactions" deletes all transaction data in a client that you select.  Delete All Clients Transactions … "Delete All Clients Transactions" deletes all transaction data in all client.  Initialize Client … "Initialize a Client" can delete transaction data and master data. All transaction data is deleted basically. And master data is deleted by "Definition of Delete Profile".  Custom Delete … "Custom Delete" delete data according to "Definition of Delete Profile". You can delete a Client data flexibly. Delete or Initialize Client Truncate If you selected “Delete All Clients Transactions”, Flag of Truncate is displayed. If you tick the flag, Delete Client and Initialize Client process deletes data by using “Truncate”.  Delete Client and Initialize Client Process If you perform "Delete Client and Initialize Client Process“, You can delete client and Initialize client. Get Log of Update SQL 0
  • 7. OSS ERP Solutions Co., Ltd. All Right Reserved. 6 Delete Client and Initialize Client Process Delete Profile You can select Delete profile except “Delete a Client”. Get Log of Update SQL 0 If you tick this flag, Delete Client and Initialize Client process get the all log of SQL that update and delete records. Check of Parameters You can not perform “Super User”. Please use “System User”. Check of user Check of Client ID If you want to perform "Delete All Clients Transactions", Please Enter 0 to Client ID. Else You can not enter 0 to Client ID. Check of Delete Profile You have to enter a "Delete Profile", When you selected "Initialize a Client" or "Custom Delete".
  • 8. OSS ERP Solutions Co., Ltd. All Right Reserved. 7 Delete Client and Initialize Client Process Flow of Delete Client and Initialize Client process. Process flow of "Delete a Client" Step1:Delete Data of “Transaction Tables” “Delete a Client“ deletes all data in a client that you select. Step2:Delete Data of Not “Transaction Tables” Step3:Delete records that refer to delete Client. ◆Step4:Reset count of Primary key ID. Reset count of Primary key ID except Prefix of Table Name is “AD_” and current ID less than 1000000. Process flow of "Delete a Client Transactions" “Custom Delete” delete data according to “Definition of Delete Profile”. It is handled in Sequence number.
  • 9. OSS ERP Solutions Co., Ltd. All Right Reserved. 8 Delete Client and Initialize Client Process Process flow of "Delete a Client Transactions" Delete a Client Transactions deletes all transaction data in a client that you select. Step1:Delete Data of "Transaction Tables" Step2:Set null records that refer "Transaction Tables" Step3:Reset count of Document number Step4:Process of Delete Profile ◆Step5:Reset count of Primary key ID Reset count of Primary key ID to Transaction Tables except Prefix of Table Name is “AD_” and current ID less than 1000000.
  • 10. OSS ERP Solutions Co., Ltd. All Right Reserved. 9 Delete Client and Initialize Client Process Process flow of "Delete All Clients Transactions" Process flow of "Delete All Clients Transactions" is same as Process flow of "Delete a Client Transactions" basically. But be careful to tick TRUNCATE flag. TRUNCATE perform with option of "CASCADE" and ignore WHERE clause of Delete Profile. All records that table is defined in Delete Profile is deleted.
  • 11. OSS ERP Solutions Co., Ltd. All Right Reserved. 10 Delete Client and Initialize Client Process Process flow of "Initialize a Client" Initialize a Client can delete transaction data and master data. All transaction data is deleted basically. And master data is deleted by Definition of Delete Profile. Step1:Delete Data of "Transaction Tables". Step2:Set null records that refer "Transaction Tables". Step3:Reset count of Document number. Step4:Delete all data that table is not contained “Initialize Table” and “Definition of Delete Profile”. Step5:Process of Delete profile. ◆Step6:Reset count of Primary key ID. Reset count of Primary key ID except Prefix of Table Name is “AD_” and current ID less than 1000000.
  • 12. OSS ERP Solutions Co., Ltd. All Right Reserved. 11 Delete Profile Delete Profile Tab of Delete Profile Delete Profile [ #/#] System Delete Profile Client* *Oranization* 1000000Search key testName* Description  Active Value = ‘HQ’AD_Org_ID Where Description= ‘default’AD_Role_ID Where Description= ‘default’AD_User_ID Where Initialize ClientDelete or Initialize Client* ▼ You can select next 4 ways that delete or initialize client.  Delete a Client Transactions  Delete All Clients Transactions  Initialize Client  Custom Delete Delete or Initialize Client Description= ‘default’C_BPartner_ID Where M_Product_ID < 0M_Product_ID Where Modify Client name  Delete Profile You can customize “Delete Client and Initialize Client Process” flexibly by using “Delete Profile”. “Definition of Delete Profile” is configuration setting of “Delete Profile”.
  • 13. OSS ERP Solutions Co., Ltd. All Right Reserved. 12 Delete Profile AD_Org_ID-WHERE This field is displayed when you select Initialize a Client. You can input default organization condition. If you keep blank this field, Organizations are not deleted. AD_Role_ID-WHERE This field is displayed when you select Initialize a Client. You can input default Role condition. If you keep blank this field, Roles are not deleted. AD_User_ID-WHERE This field is displayed when you select Initialize a Client. You can input default User condition. If you keep blank this field, Users are not deleted. If you delete user, Delete Client and Initialize Client Process updates "CreatedBy" and "UpdatedBy" at "SuperUser". C_BPartner_ID-WHERE This field is displayed when you select Initialize a Client. You can input default Business partner condition. If you keep blank this field, Business Partners are not deleted. M_Product_ID-WHERE This field is displayed when you select Initialize a Client". You can input default Product condition. If you keep blank this field, Products are not deleted. This field is displayed when you select Initialize a Client. You can input new Client Name in stead of Initialized old Client Name. Modify Client name
  • 14. OSS ERP Solutions Co., Ltd. All Right Reserved. 13 Delete Profile Tab of Custom Delete Profile Delete Profile > Custom Delete Profile [ #/#] System Delete Profile Client* *Organization* Description  Active Sql WHERE 10Sequence* Table* testDelete Profile* Delete data not use Delete data not use If you tick on this check box, Delete Client and Initialize Process deletes records that is not referenced by other records. Treat of Foreign Key ▼ 0Foreign key ID Table Delete Table. Sql WHERE You can define a remain record condition. If you keep blank this field, Data in this table is not deleted(All records remain). Sequence Process order. Tab of “Custom Delete Profile” can define Delete profile flexibly. Important definition that need to explain is Treat of Foreign key. You can define a way to process data that refer this table records. 【Caution】Judgment of the records that are using now or not This flag can not judge correclty if Foreign Key use below reference. ID / Location / Locator / Account / Assignment / PAttribute / Image / Chart / Color
  • 15. OSS ERP Solutions Co., Ltd. All Right Reserved. 14 Delete Profile Treat of Foreign Key Policy of Treat of Foreign Key.  Set NULL ---> If Foreign Key has refer to delete records, set Null except define of Custom Delete Profile Line.  Set Value ---> If Foreign Key has refer to delete records, set Value except define of Custom Delete Profile Line.  Delete Records ---> If Foreign Key has refer to delete records, Delete the records except define of Custom Delete Profile Line.  Mandatory = true ? Delete : NULL ---> If Column of Foreign Key is Mandatory, Delete the record. If Column of Foreign Key is not Mandatory, set null to the column.  Mandatory = true ? Delete : Value ---> If Column of Foreign Key is Mandatory, Delete the record. If Column of Foreign Key is not Mandatory, set Value to the column.  Mandatory = true ? Value : NULL ---> If Column of Foreign Key is Mandatory, set Value to the column. If Column of Foreign Key is not Mandatory, set null to the column.  Mandatory = true ? Value : Delete ---> If Column of Foreign Key is Mandatory, set Value to the column. If Column of Foreign Key is not Mandatory, Delete the record. Foreign Key ID If you select "Set Value" at field of Treat of Foreign Key. Delete Client and Initialize process put this value into Foreign Key. Create Custom Delete Profile Line if you use process of Create Custom Delete Profile Line, you can create custom delete profile lines that refer this table. Precautions for use of Create Custom Delete Profile Line Process ・This process can not create line if there are lines already. ・This process can not create line if Foreign Key refer to table by using as follow reference and name of column is not "ReferredTableName_ID". Location / Locator / Account / Assignment / PAttribute / Image / Chart / Color
  • 16. OSS ERP Solutions Co., Ltd. All Right Reserved. 15 Delete Profile Tab of Custom Delete Profile Line [ # /# ] System Delete Profile Client* *Organization* Description  Active 10Sequence* Table* Custom Delete Profile* Link Column* ▼ ▼Treat of Foreign Key* Treat of Foreign Key Policy of Treat of Foreign Key.  Set NULL ---> If Foreign Key has refer to delete records, Set null to this Foreign Key.  Set Value ---> If Foreign Key has refer to delete records, Set Value to this Foreign Key.  Delete Records ---> If Foreign Key has refer to delete records, Delete the records. 0Foreign Key ID If you want to configuration that is irregular policy treat of foreign key, Please create Custom Delete Profile Lines. Table Table that have Foreign Key refer to parent table record. Sequence Process order. Link Column Column that refer to parent table record. Foreign key ID If you select Set Value at field of Treat of Foreign Key. Delete Client and Initialize Process put this value into Foreign Key. Delete Profile > Custom Delete Profile > Custom Delete Profile Line
  • 17. OSS ERP Solutions Co., Ltd. All Right Reserved. 16 Delete Client and Initialize Client Confirmation Reports Delete Tables Confirmation Report Parameters Delete Tables Confirmation Report Save Parameters ▼ Delete Profile* ▼  Delete Client and Initialize Client Confirmation Reports This report can list of tables that is defined by Delete Profile. You can confirm Delete way per Table.  Display All Tables Report(Excel) Please refer description column. That column display information of delete way.
  • 18. OSS ERP Solutions Co., Ltd. All Right Reserved. 17 Delete Client and Initialize Client Confirmation Reports Table Relations Confirmation Report Parameters Delete Tables Confirmation Report Save Parameters ▼ Referenced Table* ▼ This report can list information of foreign key column. Report(Excel) This report can list information of foreign key column. Case of tables that is not able to contain this list Case of tables that is not able to contain this list ID / Location / Locator / Account / Assignment / PAttribute / Image / Chart / Color
  • 19. OSS ERP Solutions Co., Ltd. All Right Reserved. 18 Set Up Pack in 2Pack.zip under META-INF folder  Set up Delete Client and Initialize Client This report can list of tables that is defined by Delete Profile. You can confirm Delete way per Table. 2Pack will create the 2 windows and 2 Reports, 1 Process.  Delere Profile(Window)  Delere Client and Initialize Client Log(Window)  Delere Tables Confirmation Report(Report)  Table Relations Confirmation Report(Report)  Delere Client and Lnitialize Client Process(Process) You can create Table from DDL that is in SQL-DDL folder. If you can't pack in, please create table from DDL as follows.  JPIERE-0158-JP_DeleteProfile.txt  JPIERE-0158-JP_CustomDeleteProfile.txt  JPIERE-0158-JP_CustomDeleteProfileLine.txt  JPIERE-0158-T_DeleteClientLogJP.txt Apply process of "Create Custom Delete Profile Line" to Tab of Custom Delete Profile After pack in 2Pack.zip, please apply process of Create Custom Delete Profile Line to Tab of Custom Delete Profile.
  • 20. OSS ERP Solutions Co., Ltd. All Right Reserved. 19 http://www.oss-erp.co.jp/ We can support business challenges of your company Quickly and at Low cost by using open source. We are Solution Provider of OSS ERP and Distributor of OSS ERP