IDEMPIERE-5567 Support of UUID as Foreign Key (FHCA-4195) (#1741)

* IDEMPIERE-5567 Support of UUID as Key (FHCA-4195) - Foreign Keys

* - Table Direct working as read-only and link column

* - Fixes for Table with Reference

* - Add UUID FK management to Migrate ID process
- Add MColumn.beforeSave validation to force UUID columns to end with _UU
- Add table TestUUDet with two foreign keys pointing to TestUU (TableDir and Search)
- Add detail tab to Test UU Based Table window
- Add a new test window named Test UU Detail
- Generate model classes for the new test table
- Add test case for the detail test table
- Add MTable.isIDKeyTable method
- Add UU foreign key cross tenant validation to PO.validForeignKeys

* - Added a Chosen Multiple Selection Table with foreign UU for testing
- Changed reference in dictionary logic and sql to reflect new data types
- Disable SearchUU temporarily (will be worked in next step)
- Add validation to avoid encrypting UUID columns
- Avoid warning when searching for getPO method on UUID based tables
- Make Zoom Across button work with UUID foreign keys
- Enable zoom and zoom to detail for UUID foreign keys
- Enable Find Advanced on detail foreign UUID keys

* - Fix javadoc
- Quote properly UUID
- Validate null on return

* - Fix zoom logic - tested zooming to tab in first second and third level
This commit is contained in:
Carlos Ruiz 2023-04-05 04:26:27 +02:00 committed by GitHub
parent 30d89378c8
commit a967069164
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 2014 additions and 272 deletions

View File

@ -0,0 +1,134 @@
-- IDEMPIERE-5567 Support of UUID as Key (FHCA-4195)
SELECT register_migration_script('202303161612_IDEMPIERE-5567.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Mar 16, 2023, 4:12:22 PM CET
INSERT INTO AD_Reference (AD_Reference_ID,Name,Description,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU,ShowInactive) VALUES (200233,'Table (UU)','Table List based on UUID','D',0,0,'Y',TO_TIMESTAMP('2023-03-16 16:12:21','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-16 16:12:21','YYYY-MM-DD HH24:MI:SS'),100,'D','N','7a610848-25e3-4f38-ad47-5e79daf132fd','N')
;
-- Mar 16, 2023, 4:12:35 PM CET
INSERT INTO AD_Reference (AD_Reference_ID,Name,Description,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU,ShowInactive) VALUES (200234,'Table Direct (UU)','Direct Table Access based on UUID','D',0,0,'Y',TO_TIMESTAMP('2023-03-16 16:12:34','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-16 16:12:34','YYYY-MM-DD HH24:MI:SS'),100,'D','N','52a4c2d4-3afb-47ef-b57c-8c9fc88bedff','N')
;
-- Mar 16, 2023, 4:12:53 PM CET
INSERT INTO AD_Reference (AD_Reference_ID,Name,Description,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU,ShowInactive) VALUES (200235,'Search (UU)','Search Field based on UUID','D',0,0,'N',TO_TIMESTAMP('2023-03-16 16:12:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-16 16:12:53','YYYY-MM-DD HH24:MI:SS'),100,'D','N','f741f1a8-bc99-48cc-80a8-0c5d3bf85dbb','N')
;
-- Mar 16, 2023, 5:21:52 PM CET
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=18 | @AD_Reference_ID@=21 | @AD_Reference_ID@=25 | @AD_Reference_ID@=31 | @AD_Reference_ID@=35 | @AD_Reference_ID@=33 | @AD_Reference_ID@=32 | @AD_Reference_ID@=53370 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-16 17:21:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202518
;
-- Mar 16, 2023, 5:22:02 PM CET
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=18 | @AD_Reference_ID@=21 | @AD_Reference_ID@=25 | @AD_Reference_ID@=31 | @AD_Reference_ID@=35 | @AD_Reference_ID@=33 | @AD_Reference_ID@=32 | @AD_Reference_ID@=53370 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-16 17:22:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202519
;
-- Mar 16, 2023, 5:23:17 PM CET
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-16 17:23:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=172
;
-- Mar 16, 2023, 5:23:24 PM CET
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-16 17:23:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206091
;
-- Mar 16, 2023, 6:38:53 PM CET
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-16 18:38:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=171
;
-- Mar 24, 2023, 5:28:41 PM CET
INSERT INTO AD_Reference (AD_Reference_ID,Name,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU,ShowInactive) VALUES (200237,'AD_Table with ID or UU Column','T',0,0,'Y',TO_TIMESTAMP('2023-03-24 17:28:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 17:28:41','YYYY-MM-DD HH24:MI:SS'),100,'D','N','23255e3a-0bf4-43f9-afdf-419ab47e21ff','N')
;
-- Mar 24, 2023, 5:29:41 PM CET
INSERT INTO AD_Ref_Table (AD_Reference_ID,AD_Table_ID,AD_Key,AD_Display,WhereClause,OrderByClause,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsValueDisplayed,EntityType,AD_Ref_Table_UU) VALUES (200237,100,100,100,'AD_Table.IsView=''N'' AND AD_Table.IsActive=''Y'' AND EXISTS (SELECT 1 FROM AD_Column c WHERE c.AD_Table_ID=AD_Table.AD_Table_ID AND (UPPER(c.ColumnName)=UPPER(AD_Table.TableName)||''_ID'' OR UPPER(c.ColumnName)=UPPER(AD_Table.TableName)||''_UU'') AND c.IsActive=''Y'')','AD_Table.TableName',0,0,'Y',TO_TIMESTAMP('2023-03-24 17:29:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 17:29:41','YYYY-MM-DD HH24:MI:SS'),100,'N','D','908b6255-4cf4-4d76-9208-acc5e36c6add')
;
-- Mar 24, 2023, 5:29:58 PM CET
UPDATE AD_Process_Para SET AD_Reference_Value_ID=200237,Updated=TO_TIMESTAMP('2023-03-24 17:29:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200264
;
-- Mar 24, 2023, 6:49:29 PM CET
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('E','UUID Columns must end with suffix _UU',0,0,'Y',TO_TIMESTAMP('2023-03-24 18:49:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 18:49:28','YYYY-MM-DD HH24:MI:SS'),100,200827,'UUColumnsMustEndWithUU','D','183dfdda-b98b-4702-a942-11eaf0d5f816')
;
-- Mar 29, 2023, 6:40:54 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235 & @AttributeValueType@=''R''',Updated=TO_TIMESTAMP('2023-03-29 18:40:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206510
;
-- Mar 29, 2023, 6:41:44 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235 & @AttributeValueType@=''R''',Updated=TO_TIMESTAMP('2023-03-29 18:41:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204144
;
-- Mar 29, 2023, 6:42:38 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=10 | @AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:42:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206409
;
-- Mar 29, 2023, 6:43:19 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:43:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201623
;
-- Mar 29, 2023, 6:43:58 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:43:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201622
;
-- Mar 29, 2023, 6:49:50 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:49:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10223
;
-- Mar 29, 2023, 6:50:27 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:50:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10225
;
-- Mar 29, 2023, 6:51:46 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=10 | @AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:51:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206410
;
-- Mar 29, 2023, 6:52:53 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=10 | @AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:52:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56279
;
-- Mar 29, 2023, 7:08:17 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=30 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:08:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54403
;
-- Mar 29, 2023, 7:09:03 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:09:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201895
;
-- Mar 29, 2023, 7:10:02 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=10 | @AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:10:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206408
;
-- Mar 29, 2023, 7:10:41 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:10:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203266
;
-- Mar 29, 2023, 7:11:05 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:11:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206130
;
-- Mar 29, 2023, 7:11:47 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:11:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200855
;
-- Mar 29, 2023, 7:12:39 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:12:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54401
;
-- Mar 29, 2023, 7:13:00 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:13:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206129
;
-- Mar 29, 2023, 7:13:29 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:13:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54402
;
-- Mar 29, 2023, 7:38:53 PM CEST
UPDATE AD_Val_Rule SET Code='(AD_Ref_List.Value!=''M'' OR @AD_Reference_ID@ IN (18,19,30,200233,200234,200235))',Updated=TO_TIMESTAMP('2023-03-29 19:38:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200064
;
-- Mar 29, 2023, 7:40:49 PM CEST
UPDATE AD_Val_Rule SET Code='AD_Reference.AD_Reference_ID IN (10,11,12,13,14,15,16,17,18,19,20,22,24,25,27,29,30,31,32,33,34,36,37,38,39,40,200233,200234,200235)',Updated=TO_TIMESTAMP('2023-03-29 19:40:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200090
;

View File

@ -0,0 +1,447 @@
-- IDEMPIERE-5567 Support of UUID as Foreign Key (FHCA-4195)
SELECT register_migration_script('202303241637_IDEMPIERE-5567.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Mar 24, 2023, 4:37:27 PM CET
INSERT INTO AD_Table (AD_Table_ID,Name,TableName,AccessLevel,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSecurityEnabled,IsDeleteable,IsHighVolume,IsView,EntityType,IsChangeLog,ReplicationType,AD_Table_UU,Processing) VALUES (200384,'Test UU Detail','TestUUDet','7',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:26','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:26','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','N','D','Y','L','a0dd2706-936b-4520-a38a-5afdccb92ecf','N')
;
-- Mar 24, 2023, 4:37:27 PM CET
INSERT INTO AD_Sequence (Name,CurrentNext,IsAudited,StartNewYear,Description,IsActive,IsTableID,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,AD_Sequence_ID,IsAutoSequence,StartNo,IncrementNo,CurrentNextSys,AD_Sequence_UU) VALUES ('TestUUDet',1000000,'N','N','Table TestUUDet','Y','Y',0,0,TO_TIMESTAMP('2023-03-24 16:37:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:27','YYYY-MM-DD HH24:MI:SS'),100,200454,'Y',1000000,1,200000,'24b75e22-fd49-4cd6-87e4-887f915bc660')
;
-- Mar 24, 2023, 4:37:28 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,ReadOnlyLogic,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215795,0.0,'Tenant','Tenant for this installation.','A Tenant is a company or a legal entity. You cannot share data between Tenants.',200384,'AD_Client_ID','@#AD_Client_ID@',10,'N','N','Y','N','N','N',30,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:27','YYYY-MM-DD HH24:MI:SS'),100,102,'N','N','1=1','D','N','d91c6d4c-ae37-4257-b99c-6c7bcabc1ccd','N')
;
-- Mar 24, 2023, 4:37:28 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215796,0.0,'Organization','Organizational entity within tenant','An organization is a unit of your tenant or legal entity - examples are store, department. You can share data between organizations.',200384,'AD_Org_ID','@AD_Org_ID@',10,'N','N','Y','N','N','N',19,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:28','YYYY-MM-DD HH24:MI:SS'),100,113,'N','N','D','N','34378f01-63d9-47f1-8dbb-6010ea059ac1','N')
;
-- Mar 24, 2023, 4:37:28 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215797,0.0,'Created','Date this record was created','The Created field indicates the date that this record was created.',200384,'Created',7,'N','N','Y','N','N','N',16,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:28','YYYY-MM-DD HH24:MI:SS'),100,245,'N','N','D','N','f47ee517-9a13-4587-a204-028580011acf','N')
;
-- Mar 24, 2023, 4:37:29 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215798,0.0,'Created By','User who created this records','The Created By field indicates the user who created this record.',200384,'CreatedBy',10,'N','N','Y','N','N','N',30,110,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:28','YYYY-MM-DD HH24:MI:SS'),100,246,'N','N','D','N','226b0974-6e82-4f4e-b45f-26dc6d564768','N')
;
-- Mar 24, 2023, 4:37:29 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215799,0.0,'Updated','Date this record was updated','The Updated field indicates the date that this record was updated.',200384,'Updated',7,'N','N','Y','N','N','N',16,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:29','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:29','YYYY-MM-DD HH24:MI:SS'),100,607,'N','N','D','N','72cc17f9-123a-46b6-b917-9b3346fb6f91','N')
;
-- Mar 24, 2023, 4:37:30 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215800,0.0,'Updated By','User who updated this records','The Updated By field indicates the user who updated this record.',200384,'UpdatedBy',10,'N','N','Y','N','N','N',30,110,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:29','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:29','YYYY-MM-DD HH24:MI:SS'),100,608,'N','N','D','N','f6613f51-004b-436b-965a-fda212908640','N')
;
-- Mar 24, 2023, 4:37:30 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215801,0.0,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200384,'IsActive','Y',1,'N','N','Y','N','N','N',20,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:30','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:30','YYYY-MM-DD HH24:MI:SS'),100,348,'Y','N','D','N','89c118cb-eb52-4de6-9978-793091ae23b6','N')
;
-- Mar 24, 2023, 4:37:30 PM CET
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203795,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:30','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:30','YYYY-MM-DD HH24:MI:SS'),100,'TestUUDet_UU','TestUUDet_UU','TestUUDet_UU','D','76076418-4f48-4d5f-862c-a7925a791b32')
;
-- Mar 24, 2023, 4:37:31 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215802,0.0,'TestUUDet_UU',200384,'TestUUDet_UU',36,'N','N','N','N','N','N',200231,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:30','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:30','YYYY-MM-DD HH24:MI:SS'),100,203795,'Y','N','D','N','bd716d09-9915-4c16-a101-a1b71c4af014','N')
;
-- Mar 24, 2023, 4:37:31 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,SeqNoSelection,IsToolbarButton) VALUES (215803,0.0,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200384,'Name',60,'N','N','Y','N','Y','N',10,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:31','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:31','YYYY-MM-DD HH24:MI:SS'),100,469,'Y','Y','D','N','dfb02d82-8abd-4903-9b0f-aa03acfb8c57',10,'N')
;
-- Mar 24, 2023, 4:37:31 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215804,0.0,'Sales Representative','Sales Representative or Company Agent','The Sales Representative indicates the Sales Rep for this Region. Any Sales Rep must be a valid internal user.',200384,'SalesRep_ID',10,'N','N','Y','N','N','N',30,190,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:31','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:31','YYYY-MM-DD HH24:MI:SS'),100,1063,'Y','N','D','N','125cc090-2a67-4aac-836e-79e1fd939c81','N')
;
-- Mar 24, 2023, 4:37:32 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215805,0.0,'User/Contact','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact',200384,'AD_User_ID',10,'N','N','Y','N','N','N',30,110,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:31','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:31','YYYY-MM-DD HH24:MI:SS'),100,138,'Y','N','D','N','8539cc97-e3c6-4e40-b5f7-1fc075b4a886','N')
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_Element SET Name='Test UU', PrintName='Test UU',Updated=TO_TIMESTAMP('2023-03-24 16:38:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=203793
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_Column SET ColumnName='TestUU_UU', Name='Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203793
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_Process_Para SET ColumnName='TestUU_UU', Name='Test UU', Description=NULL, Help=NULL, AD_Element_ID=203793 WHERE UPPER(ColumnName)='TESTUU_UU' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_Process_Para SET ColumnName='TestUU_UU', Name='Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203793 AND IsCentrallyMaintained='Y'
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_InfoColumn SET ColumnName='TestUU_UU', Name='Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203793 AND IsCentrallyMaintained='Y'
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_Field SET Name='Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=203793) AND IsCentrallyMaintained='Y'
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_PrintFormatItem SET PrintName='Test UU', Name='Test UU' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=203793)
;
-- Mar 24, 2023, 4:39:33 PM CET
UPDATE AD_Column SET Name='Test UU', Description=NULL, Help=NULL, ColumnName='TestUU_UU', FieldLength=36, AD_Reference_ID=200234, AD_Reference_Value_ID=NULL, AD_Element_ID=203793,Updated=TO_TIMESTAMP('2023-03-24 16:39:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215805
;
-- Mar 24, 2023, 4:40:40 PM CET
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,Help,PrintName,EntityType,AD_Element_UU) VALUES (203796,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:40:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:40:09','YYYY-MM-DD HH24:MI:SS'),100,'AltTestUU_UU','Alternate Test UU',NULL,NULL,'Alternate Test UU','D','1056f895-a7b0-49c0-b60e-1e5e702a19b1')
;
-- Mar 24, 2023, 4:41:07 PM CET
INSERT INTO AD_Reference (AD_Reference_ID,Name,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU,ShowInactive) VALUES (200236,'Test UU','T',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:41:07','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:41:07','YYYY-MM-DD HH24:MI:SS'),100,'D','N','3eaddbd9-67d0-4e16-ae0b-4a6acee3a1e6','N')
;
-- Mar 24, 2023, 4:42:05 PM CET
INSERT INTO AD_Ref_Table (AD_Reference_ID,AD_Table_ID,AD_Key,AD_Display,OrderByClause,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsValueDisplayed,EntityType,AD_Ref_Table_UU) VALUES (200236,200383,215785,215785,'TestUU.Name',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:42:05','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:42:05','YYYY-MM-DD HH24:MI:SS'),100,'N','D','00dc355b-14fe-4a48-aa7f-fb7a7b659ba1')
;
-- Mar 24, 2023, 4:42:24 PM CET
UPDATE AD_Column SET Name='Alternate Test UU', Description=NULL, Help=NULL, ColumnName='AltTestUU_UU', FieldLength=36, AD_Reference_ID=200235, AD_Reference_Value_ID=200236, AD_Element_ID=203796,Updated=TO_TIMESTAMP('2023-03-24 16:42:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215804
;
-- Mar 24, 2023, 4:42:33 PM CET
UPDATE AD_Column SET IsAllowCopy='N', FKConstraintName='ADClient_TestUUDet', FKConstraintType='N',Updated=TO_TIMESTAMP('2023-03-24 16:42:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215795
;
-- Mar 24, 2023, 4:42:33 PM CET
UPDATE AD_Column SET IsAllowCopy='N', FKConstraintName='ADOrg_TestUUDet', FKConstraintType='N',Updated=TO_TIMESTAMP('2023-03-24 16:42:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215796
;
-- Mar 24, 2023, 4:42:33 PM CET
UPDATE AD_Column SET FKConstraintName='AltTestUUUU_TestUUDet', FKConstraintType='N',Updated=TO_TIMESTAMP('2023-03-24 16:42:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215804
;
-- Mar 24, 2023, 4:42:33 PM CET
UPDATE AD_Column SET IsAllowCopy='N', FKConstraintName='CreatedBy_TestUUDet', FKConstraintType='N',Updated=TO_TIMESTAMP('2023-03-24 16:42:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215798
;
-- Mar 24, 2023, 4:42:33 PM CET
UPDATE AD_Column SET FKConstraintName='TestUUUU_TestUUDet', FKConstraintType='N',Updated=TO_TIMESTAMP('2023-03-24 16:42:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215805
;
-- Mar 24, 2023, 4:42:33 PM CET
UPDATE AD_Column SET IsAllowCopy='N', FKConstraintName='UpdatedBy_TestUUDet', FKConstraintType='N',Updated=TO_TIMESTAMP('2023-03-24 16:42:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215800
;
-- Mar 24, 2023, 4:42:33 PM CET
CREATE TABLE TestUUDet (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, AltTestUU_UU VARCHAR2(36 CHAR) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name VARCHAR2(60 CHAR) NOT NULL, TestUUDet_UU VARCHAR2(36 CHAR) DEFAULT NULL , TestUU_UU VARCHAR2(36 CHAR) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, CONSTRAINT TestUUDet_UU_idx PRIMARY KEY (TestUUDet_UU))
;
-- Mar 24, 2023, 4:42:33 PM CET
ALTER TABLE TestUUDet ADD CONSTRAINT ADClient_TestUUDet FOREIGN KEY (AD_Client_ID) REFERENCES ad_client(ad_client_id) DEFERRABLE INITIALLY DEFERRED
;
-- Mar 24, 2023, 4:42:33 PM CET
ALTER TABLE TestUUDet ADD CONSTRAINT ADOrg_TestUUDet FOREIGN KEY (AD_Org_ID) REFERENCES ad_org(ad_org_id) DEFERRABLE INITIALLY DEFERRED
;
-- Mar 24, 2023, 4:42:33 PM CET
ALTER TABLE TestUUDet ADD CONSTRAINT AltTestUUUU_TestUUDet FOREIGN KEY (AltTestUU_UU) REFERENCES TestUU(TestUU_UU) DEFERRABLE INITIALLY DEFERRED
;
-- Mar 24, 2023, 4:42:33 PM CET
ALTER TABLE TestUUDet ADD CONSTRAINT CreatedBy_TestUUDet FOREIGN KEY (CreatedBy) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED
;
-- Mar 24, 2023, 4:42:33 PM CET
ALTER TABLE TestUUDet ADD CONSTRAINT TestUUUU_TestUUDet FOREIGN KEY (TestUU_UU) REFERENCES TestUU(TestUU_UU) DEFERRABLE INITIALLY DEFERRED
;
-- Mar 24, 2023, 4:42:33 PM CET
ALTER TABLE TestUUDet ADD CONSTRAINT UpdatedBy_TestUUDet FOREIGN KEY (UpdatedBy) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED
;
-- Mar 24, 2023, 4:43:02 PM CET
INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsTranslationTab,IsReadOnly,AD_Column_ID,OrderByClause,Processing,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU) VALUES (200349,'Test UU Detail',200138,20,'Y',200384,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:01','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N',215805,'TestUUDet.Name','N',1,'N','D','Y','N','0c329e35-319d-401f-8be0-50bf1224e93b')
;
-- Mar 24, 2023, 4:43:02 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207582,'Tenant','Tenant for this installation.','A Tenant is a company or a legal entity. You cannot share data between Tenants.',200349,215795,'Y',10,10,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:02','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','c5d3b3f4-ad2c-4d5f-b389-6ce51b1d967a','Y',10,2)
;
-- Mar 24, 2023, 4:43:02 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (207583,'Organization','Organizational entity within tenant','An organization is a unit of your tenant or legal entity - examples are store, department. You can share data between organizations.',200349,215796,'Y',10,20,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:02','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','7247c80b-0079-4f1d-9f95-3ac8173b11c0','Y','Y',20,4,2)
;
-- Mar 24, 2023, 4:43:03 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207584,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200349,215803,'Y',60,30,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:02','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','db0f229a-b22f-413f-94e7-8564ec05f5e8','Y',30,5)
;
-- Mar 24, 2023, 4:43:03 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (207585,'TestUUDet_UU',200349,215802,'N',36,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:03','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','e305c9af-7e70-4bce-bbdc-8a9822096ec1','N',2)
;
-- Mar 24, 2023, 4:43:03 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207586,'Alternate Test UU',200349,215804,'Y',36,40,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:03','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f0cfbddf-17ea-431c-9404-968a68b97f1b','Y',40,2)
;
-- Mar 24, 2023, 4:43:04 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207587,'Test UU',200349,215805,'Y',36,50,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:03','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','a1ced8df-f59e-4f50-8e98-8ab46781d92e','Y',50,2)
;
-- Mar 24, 2023, 4:43:04 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (207588,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200349,215801,'Y',1,60,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:04','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','42acf576-76b4-41d3-8ee1-2683e002308d','Y',60,2,2)
;
-- Mar 24, 2023, 4:43:04 PM CET
UPDATE AD_Table SET AD_Window_ID=200138,Updated=TO_TIMESTAMP('2023-03-24 16:43:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200384
;
-- Mar 24, 2023, 4:43:27 PM CET
INSERT INTO AD_Window (AD_Window_ID,Name,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,WindowType,Processing,EntityType,IsSOTrx,IsDefault,IsBetaFunctionality,AD_Window_UU) VALUES (200139,'Test UU Detail',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:27','YYYY-MM-DD HH24:MI:SS'),100,'M','N','D','Y','N','N','d00d4825-3c3f-4fdb-b9fb-cfde86348020')
;
-- Mar 24, 2023, 4:43:27 PM CET
INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsTranslationTab,IsReadOnly,OrderByClause,Processing,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU) VALUES (200350,'Test UU Detail',200139,10,'Y',200384,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:27','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','TestUUDet.Name','N',0,'N','D','Y','N','36b10541-db9c-4de4-b4de-2329979f4dff')
;
-- Mar 24, 2023, 4:43:28 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207589,'Tenant','Tenant for this installation.','A Tenant is a company or a legal entity. You cannot share data between Tenants.',200350,215795,'Y',10,10,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:27','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','19c3b52e-5514-4e95-a30d-5e3bd82ca49a','Y',10,2)
;
-- Mar 24, 2023, 4:43:28 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (207590,'Organization','Organizational entity within tenant','An organization is a unit of your tenant or legal entity - examples are store, department. You can share data between organizations.',200350,215796,'Y',10,20,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:28','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','ffa6d972-4bab-499f-aada-f7770e9e056a','Y','Y',20,4,2)
;
-- Mar 24, 2023, 4:43:28 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207591,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200350,215803,'Y',60,30,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:28','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','7419f61f-5227-4b7a-8ce8-17fbd4beb18b','Y',30,5)
;
-- Mar 24, 2023, 4:43:29 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (207592,'TestUUDet_UU',200350,215802,'N',36,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:28','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','0dd84068-8f30-49ab-a8ee-9e5494e32a82','N',2)
;
-- Mar 24, 2023, 4:43:29 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207593,'Alternate Test UU',200350,215804,'Y',36,40,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:29','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:29','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','19a98247-e893-4dd8-a825-e76ae45576c0','Y',40,2)
;
-- Mar 24, 2023, 4:43:29 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207594,'Test UU',200350,215805,'Y',36,50,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:29','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:29','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','3c5bf017-2dec-4ae3-88e9-b74f25e210f2','Y',50,2)
;
-- Mar 24, 2023, 4:43:30 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (207595,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200350,215801,'Y',1,60,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:29','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:29','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','c66bb88f-0819-47e4-90d7-1d7542efb934','Y',60,2,2)
;
-- Mar 24, 2023, 4:43:30 PM CET
INSERT INTO AD_Menu (AD_Menu_ID,Name,Action,AD_Window_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSummary,IsSOTrx,IsReadOnly,EntityType,AD_Menu_UU) VALUES (200225,'Test UU Detail','W',200139,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:30','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:30','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','D','acf261b2-7b3d-4a6d-8e02-4a9d37e968c1')
;
-- Mar 24, 2023, 4:43:30 PM CET
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', getDate(), 100, getDate(), 100,t.AD_Tree_ID, 200225, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200225)
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=11,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200225
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=12,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=220
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=13,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=351
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=14,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200218
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=15,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=289
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=16,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=302
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=17,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200168
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=18,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200169
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=19,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200221
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=20,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200222
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=21,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=303
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=22,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200047
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=23,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200048
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=24,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=321
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=25,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=461
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=26,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=53193
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=27,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200161
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=28,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=53322
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=29,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=383
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=30,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200177
;
-- Mar 24, 2023, 4:45:47 PM CET
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=30, XPosition=1,Updated=TO_TIMESTAMP('2023-03-24 16:45:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207587
;
-- Mar 24, 2023, 4:45:47 PM CET
UPDATE AD_Field SET SeqNo=40,Updated=TO_TIMESTAMP('2023-03-24 16:45:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207584
;
-- Mar 24, 2023, 4:45:47 PM CET
UPDATE AD_Field SET SeqNo=50,Updated=TO_TIMESTAMP('2023-03-24 16:45:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207586
;
-- Mar 24, 2023, 4:45:47 PM CET
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2023-03-24 16:45:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207585
;
-- Mar 24, 2023, 4:46:00 PM CET
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2023-03-24 16:46:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215804
;
-- Mar 24, 2023, 4:46:02 PM CET
ALTER TABLE TestUUDet MODIFY AltTestUU_UU VARCHAR2(36 CHAR) DEFAULT NULL
;
-- Mar 24, 2023, 4:46:02 PM CET
ALTER TABLE TestUUDet MODIFY AltTestUU_UU NULL
;
-- Mar 24, 2023, 4:46:41 PM CET
INSERT INTO TestUUDet (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,TestUUDet_UU,Name,TestUU_UU) VALUES (0,0,TO_TIMESTAMP('2023-03-24 16:46:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:46:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','07218035-18bc-4593-b76d-d498fafc9f0b','Detail Record','4e148b89-bdd9-48a6-8a8a-7609092f965c')
;
-- Mar 24, 2023, 5:02:33 PM CET
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=30, XPosition=1,Updated=TO_TIMESTAMP('2023-03-24 17:02:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207594
;
-- Mar 24, 2023, 5:02:33 PM CET
UPDATE AD_Field SET SeqNo=40,Updated=TO_TIMESTAMP('2023-03-24 17:02:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207591
;
-- Mar 24, 2023, 5:02:33 PM CET
UPDATE AD_Field SET SeqNo=50,Updated=TO_TIMESTAMP('2023-03-24 17:02:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207593
;
-- Mar 24, 2023, 5:02:33 PM CET
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2023-03-24 17:02:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207592
;
-- Mar 29, 2023, 8:16:07 PM CEST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,Help,PrintName,EntityType,AD_Element_UU) VALUES (203799,0,0,'Y',TO_TIMESTAMP('2023-03-29 20:15:52','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-29 20:15:52','YYYY-MM-DD HH24:MI:SS'),100,'TestUU_UUs','Multi TestUU',NULL,NULL,'Multi TestUU','D','fa2ddd35-2dfe-4771-ad64-a276e878427c')
;
-- Mar 29, 2023, 8:16:45 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215809,0.0,'Multi TestUU',200384,'TestUU_UUs',2000,'N','N','Y','N','N',0,'N',200162,200236,0,0,'Y',TO_TIMESTAMP('2023-03-29 20:16:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-29 20:16:44','YYYY-MM-DD HH24:MI:SS'),100,203799,'Y','N','D','N','N','N','Y','efa1b7d2-8200-4bba-861b-87725ccf2099','Y','N','N','N','N')
;
-- Mar 29, 2023, 8:17:07 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2023-03-29 20:17:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215809
;
-- Mar 29, 2023, 8:17:09 PM CEST
ALTER TABLE TestUUDet ADD TestUU_UUs VARCHAR2(2000 CHAR) DEFAULT NULL
;
-- Mar 29, 2023, 8:17:31 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207599,'Multi TestUU',200349,215809,'Y',2000,70,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-29 20:17:31','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-29 20:17:31','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','c1927d34-4a3e-4207-9f0a-e0748be9ad67','Y',70,5)
;
-- Mar 29, 2023, 8:17:47 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, XPosition=1,Updated=TO_TIMESTAMP('2023-03-29 20:17:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207599
;
-- Mar 29, 2023, 8:17:47 PM CEST
UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2023-03-29 20:17:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207588
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_Element SET Name='Multi Test UU', PrintName='Multi Test UU',Updated=TO_TIMESTAMP('2023-03-29 20:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=203799
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_Column SET ColumnName='TestUU_UUs', Name='Multi Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203799
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_Process_Para SET ColumnName='TestUU_UUs', Name='Multi Test UU', Description=NULL, Help=NULL, AD_Element_ID=203799 WHERE UPPER(ColumnName)='TESTUU_UUS' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_Process_Para SET ColumnName='TestUU_UUs', Name='Multi Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203799 AND IsCentrallyMaintained='Y'
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_InfoColumn SET ColumnName='TestUU_UUs', Name='Multi Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203799 AND IsCentrallyMaintained='Y'
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_Field SET Name='Multi Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=203799) AND IsCentrallyMaintained='Y'
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_PrintFormatItem SET PrintName='Multi Test UU', Name='Multi Test UU' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=203799)
;
-- Mar 29, 2023, 8:18:34 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207600,'Multi Test UU',200350,215809,'Y',2000,70,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-29 20:18:34','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-29 20:18:34','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','e35c3192-8704-490f-a79a-88b746588d64','Y',70,5)
;
-- Mar 29, 2023, 8:18:42 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, XPosition=1,Updated=TO_TIMESTAMP('2023-03-29 20:18:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207600
;
-- Mar 29, 2023, 8:18:42 PM CEST
UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2023-03-29 20:18:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207595
;

View File

@ -0,0 +1,131 @@
-- IDEMPIERE-5567 Support of UUID as Key (FHCA-4195)
SELECT register_migration_script('202303161612_IDEMPIERE-5567.sql') FROM dual;
-- Mar 16, 2023, 4:12:22 PM CET
INSERT INTO AD_Reference (AD_Reference_ID,Name,Description,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU,ShowInactive) VALUES (200233,'Table (UU)','Table List based on UUID','D',0,0,'Y',TO_TIMESTAMP('2023-03-16 16:12:21','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-16 16:12:21','YYYY-MM-DD HH24:MI:SS'),100,'D','N','7a610848-25e3-4f38-ad47-5e79daf132fd','N')
;
-- Mar 16, 2023, 4:12:35 PM CET
INSERT INTO AD_Reference (AD_Reference_ID,Name,Description,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU,ShowInactive) VALUES (200234,'Table Direct (UU)','Direct Table Access based on UUID','D',0,0,'Y',TO_TIMESTAMP('2023-03-16 16:12:34','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-16 16:12:34','YYYY-MM-DD HH24:MI:SS'),100,'D','N','52a4c2d4-3afb-47ef-b57c-8c9fc88bedff','N')
;
-- Mar 16, 2023, 4:12:53 PM CET
INSERT INTO AD_Reference (AD_Reference_ID,Name,Description,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU,ShowInactive) VALUES (200235,'Search (UU)','Search Field based on UUID','D',0,0,'N',TO_TIMESTAMP('2023-03-16 16:12:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-16 16:12:53','YYYY-MM-DD HH24:MI:SS'),100,'D','N','f741f1a8-bc99-48cc-80a8-0c5d3bf85dbb','N')
;
-- Mar 16, 2023, 5:21:52 PM CET
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=18 | @AD_Reference_ID@=21 | @AD_Reference_ID@=25 | @AD_Reference_ID@=31 | @AD_Reference_ID@=35 | @AD_Reference_ID@=33 | @AD_Reference_ID@=32 | @AD_Reference_ID@=53370 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-16 17:21:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202518
;
-- Mar 16, 2023, 5:22:02 PM CET
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=18 | @AD_Reference_ID@=21 | @AD_Reference_ID@=25 | @AD_Reference_ID@=31 | @AD_Reference_ID@=35 | @AD_Reference_ID@=33 | @AD_Reference_ID@=32 | @AD_Reference_ID@=53370 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-16 17:22:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202519
;
-- Mar 16, 2023, 5:23:17 PM CET
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-16 17:23:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=172
;
-- Mar 16, 2023, 5:23:24 PM CET
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-16 17:23:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206091
;
-- Mar 16, 2023, 6:38:53 PM CET
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-16 18:38:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=171
;
-- Mar 24, 2023, 5:28:41 PM CET
INSERT INTO AD_Reference (AD_Reference_ID,Name,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU,ShowInactive) VALUES (200237,'AD_Table with ID or UU Column','T',0,0,'Y',TO_TIMESTAMP('2023-03-24 17:28:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 17:28:41','YYYY-MM-DD HH24:MI:SS'),100,'D','N','23255e3a-0bf4-43f9-afdf-419ab47e21ff','N')
;
-- Mar 24, 2023, 5:29:41 PM CET
INSERT INTO AD_Ref_Table (AD_Reference_ID,AD_Table_ID,AD_Key,AD_Display,WhereClause,OrderByClause,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsValueDisplayed,EntityType,AD_Ref_Table_UU) VALUES (200237,100,100,100,'AD_Table.IsView=''N'' AND AD_Table.IsActive=''Y'' AND EXISTS (SELECT 1 FROM AD_Column c WHERE c.AD_Table_ID=AD_Table.AD_Table_ID AND (UPPER(c.ColumnName)=UPPER(AD_Table.TableName)||''_ID'' OR UPPER(c.ColumnName)=UPPER(AD_Table.TableName)||''_UU'') AND c.IsActive=''Y'')','AD_Table.TableName',0,0,'Y',TO_TIMESTAMP('2023-03-24 17:29:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 17:29:41','YYYY-MM-DD HH24:MI:SS'),100,'N','D','908b6255-4cf4-4d76-9208-acc5e36c6add')
;
-- Mar 24, 2023, 5:29:58 PM CET
UPDATE AD_Process_Para SET AD_Reference_Value_ID=200237,Updated=TO_TIMESTAMP('2023-03-24 17:29:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200264
;
-- Mar 24, 2023, 6:49:29 PM CET
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('E','UUID Columns must end with suffix _UU',0,0,'Y',TO_TIMESTAMP('2023-03-24 18:49:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 18:49:28','YYYY-MM-DD HH24:MI:SS'),100,200827,'UUColumnsMustEndWithUU','D','183dfdda-b98b-4702-a942-11eaf0d5f816')
;
-- Mar 29, 2023, 6:40:54 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235 & @AttributeValueType@=''R''',Updated=TO_TIMESTAMP('2023-03-29 18:40:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206510
;
-- Mar 29, 2023, 6:41:44 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235 & @AttributeValueType@=''R''',Updated=TO_TIMESTAMP('2023-03-29 18:41:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204144
;
-- Mar 29, 2023, 6:42:38 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=10 | @AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:42:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206409
;
-- Mar 29, 2023, 6:43:19 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:43:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201623
;
-- Mar 29, 2023, 6:43:58 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:43:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201622
;
-- Mar 29, 2023, 6:49:50 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:49:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10223
;
-- Mar 29, 2023, 6:50:27 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:50:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10225
;
-- Mar 29, 2023, 6:51:46 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=10 | @AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:51:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206410
;
-- Mar 29, 2023, 6:52:53 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=10 | @AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 18:52:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56279
;
-- Mar 29, 2023, 7:08:17 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=30 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:08:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54403
;
-- Mar 29, 2023, 7:09:03 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:09:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201895
;
-- Mar 29, 2023, 7:10:02 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=10 | @AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:10:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206408
;
-- Mar 29, 2023, 7:10:41 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:10:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203266
;
-- Mar 29, 2023, 7:11:05 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:11:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206130
;
-- Mar 29, 2023, 7:11:47 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:11:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200855
;
-- Mar 29, 2023, 7:12:39 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:12:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54401
;
-- Mar 29, 2023, 7:13:00 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012 | @AD_Reference_ID@=31 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200234 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:13:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206129
;
-- Mar 29, 2023, 7:13:29 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28 | @AD_Reference_ID@=200152 | @AD_Reference_ID@=200161 | @AD_Reference_ID@=200162 | @AD_Reference_ID@=200163 | @AD_Reference_ID@=200233 | @AD_Reference_ID@=200235',Updated=TO_TIMESTAMP('2023-03-29 19:13:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54402
;
-- Mar 29, 2023, 7:38:53 PM CEST
UPDATE AD_Val_Rule SET Code='(AD_Ref_List.Value!=''M'' OR @AD_Reference_ID@ IN (18,19,30,200233,200234,200235))',Updated=TO_TIMESTAMP('2023-03-29 19:38:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200064
;
-- Mar 29, 2023, 7:40:49 PM CEST
UPDATE AD_Val_Rule SET Code='AD_Reference.AD_Reference_ID IN (10,11,12,13,14,15,16,17,18,19,20,22,24,25,27,29,30,31,32,33,34,36,37,38,39,40,200233,200234,200235)',Updated=TO_TIMESTAMP('2023-03-29 19:40:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200090
;

View File

@ -0,0 +1,444 @@
-- IDEMPIERE-5567 Support of UUID as Foreign Key (FHCA-4195)
SELECT register_migration_script('202303241637_IDEMPIERE-5567.sql') FROM dual;
-- Mar 24, 2023, 4:37:27 PM CET
INSERT INTO AD_Table (AD_Table_ID,Name,TableName,AccessLevel,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSecurityEnabled,IsDeleteable,IsHighVolume,IsView,EntityType,IsChangeLog,ReplicationType,AD_Table_UU,Processing) VALUES (200384,'Test UU Detail','TestUUDet','7',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:26','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:26','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','N','D','Y','L','a0dd2706-936b-4520-a38a-5afdccb92ecf','N')
;
-- Mar 24, 2023, 4:37:27 PM CET
INSERT INTO AD_Sequence (Name,CurrentNext,IsAudited,StartNewYear,Description,IsActive,IsTableID,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,AD_Sequence_ID,IsAutoSequence,StartNo,IncrementNo,CurrentNextSys,AD_Sequence_UU) VALUES ('TestUUDet',1000000,'N','N','Table TestUUDet','Y','Y',0,0,TO_TIMESTAMP('2023-03-24 16:37:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:27','YYYY-MM-DD HH24:MI:SS'),100,200454,'Y',1000000,1,200000,'24b75e22-fd49-4cd6-87e4-887f915bc660')
;
-- Mar 24, 2023, 4:37:28 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,ReadOnlyLogic,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215795,0.0,'Tenant','Tenant for this installation.','A Tenant is a company or a legal entity. You cannot share data between Tenants.',200384,'AD_Client_ID','@#AD_Client_ID@',10,'N','N','Y','N','N','N',30,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:27','YYYY-MM-DD HH24:MI:SS'),100,102,'N','N','1=1','D','N','d91c6d4c-ae37-4257-b99c-6c7bcabc1ccd','N')
;
-- Mar 24, 2023, 4:37:28 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215796,0.0,'Organization','Organizational entity within tenant','An organization is a unit of your tenant or legal entity - examples are store, department. You can share data between organizations.',200384,'AD_Org_ID','@AD_Org_ID@',10,'N','N','Y','N','N','N',19,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:28','YYYY-MM-DD HH24:MI:SS'),100,113,'N','N','D','N','34378f01-63d9-47f1-8dbb-6010ea059ac1','N')
;
-- Mar 24, 2023, 4:37:28 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215797,0.0,'Created','Date this record was created','The Created field indicates the date that this record was created.',200384,'Created',7,'N','N','Y','N','N','N',16,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:28','YYYY-MM-DD HH24:MI:SS'),100,245,'N','N','D','N','f47ee517-9a13-4587-a204-028580011acf','N')
;
-- Mar 24, 2023, 4:37:29 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215798,0.0,'Created By','User who created this records','The Created By field indicates the user who created this record.',200384,'CreatedBy',10,'N','N','Y','N','N','N',30,110,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:28','YYYY-MM-DD HH24:MI:SS'),100,246,'N','N','D','N','226b0974-6e82-4f4e-b45f-26dc6d564768','N')
;
-- Mar 24, 2023, 4:37:29 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215799,0.0,'Updated','Date this record was updated','The Updated field indicates the date that this record was updated.',200384,'Updated',7,'N','N','Y','N','N','N',16,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:29','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:29','YYYY-MM-DD HH24:MI:SS'),100,607,'N','N','D','N','72cc17f9-123a-46b6-b917-9b3346fb6f91','N')
;
-- Mar 24, 2023, 4:37:30 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215800,0.0,'Updated By','User who updated this records','The Updated By field indicates the user who updated this record.',200384,'UpdatedBy',10,'N','N','Y','N','N','N',30,110,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:29','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:29','YYYY-MM-DD HH24:MI:SS'),100,608,'N','N','D','N','f6613f51-004b-436b-965a-fda212908640','N')
;
-- Mar 24, 2023, 4:37:30 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215801,0.0,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200384,'IsActive','Y',1,'N','N','Y','N','N','N',20,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:30','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:30','YYYY-MM-DD HH24:MI:SS'),100,348,'Y','N','D','N','89c118cb-eb52-4de6-9978-793091ae23b6','N')
;
-- Mar 24, 2023, 4:37:30 PM CET
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203795,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:30','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:30','YYYY-MM-DD HH24:MI:SS'),100,'TestUUDet_UU','TestUUDet_UU','TestUUDet_UU','D','76076418-4f48-4d5f-862c-a7925a791b32')
;
-- Mar 24, 2023, 4:37:31 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215802,0.0,'TestUUDet_UU',200384,'TestUUDet_UU',36,'N','N','N','N','N','N',200231,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:30','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:30','YYYY-MM-DD HH24:MI:SS'),100,203795,'Y','N','D','N','bd716d09-9915-4c16-a101-a1b71c4af014','N')
;
-- Mar 24, 2023, 4:37:31 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,SeqNoSelection,IsToolbarButton) VALUES (215803,0.0,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200384,'Name',60,'N','N','Y','N','Y','N',10,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:31','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:31','YYYY-MM-DD HH24:MI:SS'),100,469,'Y','Y','D','N','dfb02d82-8abd-4903-9b0f-aa03acfb8c57',10,'N')
;
-- Mar 24, 2023, 4:37:31 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215804,0.0,'Sales Representative','Sales Representative or Company Agent','The Sales Representative indicates the Sales Rep for this Region. Any Sales Rep must be a valid internal user.',200384,'SalesRep_ID',10,'N','N','Y','N','N','N',30,190,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:31','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:31','YYYY-MM-DD HH24:MI:SS'),100,1063,'Y','N','D','N','125cc090-2a67-4aac-836e-79e1fd939c81','N')
;
-- Mar 24, 2023, 4:37:32 PM CET
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (215805,0.0,'User/Contact','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact',200384,'AD_User_ID',10,'N','N','Y','N','N','N',30,110,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:37:31','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:37:31','YYYY-MM-DD HH24:MI:SS'),100,138,'Y','N','D','N','8539cc97-e3c6-4e40-b5f7-1fc075b4a886','N')
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_Element SET Name='Test UU', PrintName='Test UU',Updated=TO_TIMESTAMP('2023-03-24 16:38:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=203793
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_Column SET ColumnName='TestUU_UU', Name='Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203793
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_Process_Para SET ColumnName='TestUU_UU', Name='Test UU', Description=NULL, Help=NULL, AD_Element_ID=203793 WHERE UPPER(ColumnName)='TESTUU_UU' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_Process_Para SET ColumnName='TestUU_UU', Name='Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203793 AND IsCentrallyMaintained='Y'
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_InfoColumn SET ColumnName='TestUU_UU', Name='Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203793 AND IsCentrallyMaintained='Y'
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_Field SET Name='Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=203793) AND IsCentrallyMaintained='Y'
;
-- Mar 24, 2023, 4:38:56 PM CET
UPDATE AD_PrintFormatItem SET PrintName='Test UU', Name='Test UU' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=203793)
;
-- Mar 24, 2023, 4:39:33 PM CET
UPDATE AD_Column SET Name='Test UU', Description=NULL, Help=NULL, ColumnName='TestUU_UU', FieldLength=36, AD_Reference_ID=200234, AD_Reference_Value_ID=NULL, AD_Element_ID=203793,Updated=TO_TIMESTAMP('2023-03-24 16:39:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215805
;
-- Mar 24, 2023, 4:40:40 PM CET
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,Help,PrintName,EntityType,AD_Element_UU) VALUES (203796,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:40:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:40:09','YYYY-MM-DD HH24:MI:SS'),100,'AltTestUU_UU','Alternate Test UU',NULL,NULL,'Alternate Test UU','D','1056f895-a7b0-49c0-b60e-1e5e702a19b1')
;
-- Mar 24, 2023, 4:41:07 PM CET
INSERT INTO AD_Reference (AD_Reference_ID,Name,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU,ShowInactive) VALUES (200236,'Test UU','T',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:41:07','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:41:07','YYYY-MM-DD HH24:MI:SS'),100,'D','N','3eaddbd9-67d0-4e16-ae0b-4a6acee3a1e6','N')
;
-- Mar 24, 2023, 4:42:05 PM CET
INSERT INTO AD_Ref_Table (AD_Reference_ID,AD_Table_ID,AD_Key,AD_Display,OrderByClause,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsValueDisplayed,EntityType,AD_Ref_Table_UU) VALUES (200236,200383,215785,215785,'TestUU.Name',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:42:05','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:42:05','YYYY-MM-DD HH24:MI:SS'),100,'N','D','00dc355b-14fe-4a48-aa7f-fb7a7b659ba1')
;
-- Mar 24, 2023, 4:42:24 PM CET
UPDATE AD_Column SET Name='Alternate Test UU', Description=NULL, Help=NULL, ColumnName='AltTestUU_UU', FieldLength=36, AD_Reference_ID=200235, AD_Reference_Value_ID=200236, AD_Element_ID=203796,Updated=TO_TIMESTAMP('2023-03-24 16:42:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215804
;
-- Mar 24, 2023, 4:42:33 PM CET
UPDATE AD_Column SET IsAllowCopy='N', FKConstraintName='ADClient_TestUUDet', FKConstraintType='N',Updated=TO_TIMESTAMP('2023-03-24 16:42:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215795
;
-- Mar 24, 2023, 4:42:33 PM CET
UPDATE AD_Column SET IsAllowCopy='N', FKConstraintName='ADOrg_TestUUDet', FKConstraintType='N',Updated=TO_TIMESTAMP('2023-03-24 16:42:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215796
;
-- Mar 24, 2023, 4:42:33 PM CET
UPDATE AD_Column SET FKConstraintName='AltTestUUUU_TestUUDet', FKConstraintType='N',Updated=TO_TIMESTAMP('2023-03-24 16:42:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215804
;
-- Mar 24, 2023, 4:42:33 PM CET
UPDATE AD_Column SET IsAllowCopy='N', FKConstraintName='CreatedBy_TestUUDet', FKConstraintType='N',Updated=TO_TIMESTAMP('2023-03-24 16:42:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215798
;
-- Mar 24, 2023, 4:42:33 PM CET
UPDATE AD_Column SET FKConstraintName='TestUUUU_TestUUDet', FKConstraintType='N',Updated=TO_TIMESTAMP('2023-03-24 16:42:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215805
;
-- Mar 24, 2023, 4:42:33 PM CET
UPDATE AD_Column SET IsAllowCopy='N', FKConstraintName='UpdatedBy_TestUUDet', FKConstraintType='N',Updated=TO_TIMESTAMP('2023-03-24 16:42:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215800
;
-- Mar 24, 2023, 4:42:33 PM CET
CREATE TABLE TestUUDet (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AltTestUU_UU VARCHAR(36) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name VARCHAR(60) NOT NULL, TestUUDet_UU VARCHAR(36) DEFAULT NULL , TestUU_UU VARCHAR(36) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, CONSTRAINT TestUUDet_UU_idx PRIMARY KEY (TestUUDet_UU))
;
-- Mar 24, 2023, 4:42:33 PM CET
ALTER TABLE TestUUDet ADD CONSTRAINT ADClient_TestUUDet FOREIGN KEY (AD_Client_ID) REFERENCES ad_client(ad_client_id) DEFERRABLE INITIALLY DEFERRED
;
-- Mar 24, 2023, 4:42:33 PM CET
ALTER TABLE TestUUDet ADD CONSTRAINT ADOrg_TestUUDet FOREIGN KEY (AD_Org_ID) REFERENCES ad_org(ad_org_id) DEFERRABLE INITIALLY DEFERRED
;
-- Mar 24, 2023, 4:42:33 PM CET
ALTER TABLE TestUUDet ADD CONSTRAINT AltTestUUUU_TestUUDet FOREIGN KEY (AltTestUU_UU) REFERENCES TestUU(TestUU_UU) DEFERRABLE INITIALLY DEFERRED
;
-- Mar 24, 2023, 4:42:33 PM CET
ALTER TABLE TestUUDet ADD CONSTRAINT CreatedBy_TestUUDet FOREIGN KEY (CreatedBy) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED
;
-- Mar 24, 2023, 4:42:33 PM CET
ALTER TABLE TestUUDet ADD CONSTRAINT TestUUUU_TestUUDet FOREIGN KEY (TestUU_UU) REFERENCES TestUU(TestUU_UU) DEFERRABLE INITIALLY DEFERRED
;
-- Mar 24, 2023, 4:42:33 PM CET
ALTER TABLE TestUUDet ADD CONSTRAINT UpdatedBy_TestUUDet FOREIGN KEY (UpdatedBy) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED
;
-- Mar 24, 2023, 4:43:02 PM CET
INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsTranslationTab,IsReadOnly,AD_Column_ID,OrderByClause,Processing,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU) VALUES (200349,'Test UU Detail',200138,20,'Y',200384,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:01','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N',215805,'TestUUDet.Name','N',1,'N','D','Y','N','0c329e35-319d-401f-8be0-50bf1224e93b')
;
-- Mar 24, 2023, 4:43:02 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207582,'Tenant','Tenant for this installation.','A Tenant is a company or a legal entity. You cannot share data between Tenants.',200349,215795,'Y',10,10,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:02','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','c5d3b3f4-ad2c-4d5f-b389-6ce51b1d967a','Y',10,2)
;
-- Mar 24, 2023, 4:43:02 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (207583,'Organization','Organizational entity within tenant','An organization is a unit of your tenant or legal entity - examples are store, department. You can share data between organizations.',200349,215796,'Y',10,20,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:02','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','7247c80b-0079-4f1d-9f95-3ac8173b11c0','Y','Y',20,4,2)
;
-- Mar 24, 2023, 4:43:03 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207584,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200349,215803,'Y',60,30,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:02','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','db0f229a-b22f-413f-94e7-8564ec05f5e8','Y',30,5)
;
-- Mar 24, 2023, 4:43:03 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (207585,'TestUUDet_UU',200349,215802,'N',36,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:03','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','e305c9af-7e70-4bce-bbdc-8a9822096ec1','N',2)
;
-- Mar 24, 2023, 4:43:03 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207586,'Alternate Test UU',200349,215804,'Y',36,40,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:03','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f0cfbddf-17ea-431c-9404-968a68b97f1b','Y',40,2)
;
-- Mar 24, 2023, 4:43:04 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207587,'Test UU',200349,215805,'Y',36,50,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:03','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','a1ced8df-f59e-4f50-8e98-8ab46781d92e','Y',50,2)
;
-- Mar 24, 2023, 4:43:04 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (207588,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200349,215801,'Y',1,60,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:04','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','42acf576-76b4-41d3-8ee1-2683e002308d','Y',60,2,2)
;
-- Mar 24, 2023, 4:43:04 PM CET
UPDATE AD_Table SET AD_Window_ID=200138,Updated=TO_TIMESTAMP('2023-03-24 16:43:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200384
;
-- Mar 24, 2023, 4:43:27 PM CET
INSERT INTO AD_Window (AD_Window_ID,Name,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,WindowType,Processing,EntityType,IsSOTrx,IsDefault,IsBetaFunctionality,AD_Window_UU) VALUES (200139,'Test UU Detail',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:27','YYYY-MM-DD HH24:MI:SS'),100,'M','N','D','Y','N','N','d00d4825-3c3f-4fdb-b9fb-cfde86348020')
;
-- Mar 24, 2023, 4:43:27 PM CET
INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsTranslationTab,IsReadOnly,OrderByClause,Processing,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU) VALUES (200350,'Test UU Detail',200139,10,'Y',200384,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:27','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','TestUUDet.Name','N',0,'N','D','Y','N','36b10541-db9c-4de4-b4de-2329979f4dff')
;
-- Mar 24, 2023, 4:43:28 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207589,'Tenant','Tenant for this installation.','A Tenant is a company or a legal entity. You cannot share data between Tenants.',200350,215795,'Y',10,10,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:27','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','19c3b52e-5514-4e95-a30d-5e3bd82ca49a','Y',10,2)
;
-- Mar 24, 2023, 4:43:28 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (207590,'Organization','Organizational entity within tenant','An organization is a unit of your tenant or legal entity - examples are store, department. You can share data between organizations.',200350,215796,'Y',10,20,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:28','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','ffa6d972-4bab-499f-aada-f7770e9e056a','Y','Y',20,4,2)
;
-- Mar 24, 2023, 4:43:28 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207591,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200350,215803,'Y',60,30,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:28','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','7419f61f-5227-4b7a-8ce8-17fbd4beb18b','Y',30,5)
;
-- Mar 24, 2023, 4:43:29 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (207592,'TestUUDet_UU',200350,215802,'N',36,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:28','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','0dd84068-8f30-49ab-a8ee-9e5494e32a82','N',2)
;
-- Mar 24, 2023, 4:43:29 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207593,'Alternate Test UU',200350,215804,'Y',36,40,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:29','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:29','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','19a98247-e893-4dd8-a825-e76ae45576c0','Y',40,2)
;
-- Mar 24, 2023, 4:43:29 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207594,'Test UU',200350,215805,'Y',36,50,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:29','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:29','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','3c5bf017-2dec-4ae3-88e9-b74f25e210f2','Y',50,2)
;
-- Mar 24, 2023, 4:43:30 PM CET
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (207595,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200350,215801,'Y',1,60,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:29','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:29','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','c66bb88f-0819-47e4-90d7-1d7542efb934','Y',60,2,2)
;
-- Mar 24, 2023, 4:43:30 PM CET
INSERT INTO AD_Menu (AD_Menu_ID,Name,"action",AD_Window_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSummary,IsSOTrx,IsReadOnly,EntityType,AD_Menu_UU) VALUES (200225,'Test UU Detail','W',200139,0,0,'Y',TO_TIMESTAMP('2023-03-24 16:43:30','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:43:30','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','D','acf261b2-7b3d-4a6d-8e02-4a9d37e968c1')
;
-- Mar 24, 2023, 4:43:30 PM CET
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', statement_timestamp(), 100, statement_timestamp(), 100,t.AD_Tree_ID, 200225, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200225)
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=11,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200225
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=12,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=220
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=13,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=351
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=14,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200218
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=15,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=289
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=16,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=302
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=17,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200168
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=18,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200169
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=19,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200221
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=20,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200222
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=21,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=303
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=22,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200047
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=23,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200048
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=24,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=321
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=25,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=461
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=26,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=53193
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=27,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200161
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=28,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=53322
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=29,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=383
;
-- Mar 24, 2023, 4:44:09 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=155, SeqNo=30,Updated=TO_TIMESTAMP('2023-03-24 16:44:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200177
;
-- Mar 24, 2023, 4:45:47 PM CET
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=30, XPosition=1,Updated=TO_TIMESTAMP('2023-03-24 16:45:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207587
;
-- Mar 24, 2023, 4:45:47 PM CET
UPDATE AD_Field SET SeqNo=40,Updated=TO_TIMESTAMP('2023-03-24 16:45:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207584
;
-- Mar 24, 2023, 4:45:47 PM CET
UPDATE AD_Field SET SeqNo=50,Updated=TO_TIMESTAMP('2023-03-24 16:45:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207586
;
-- Mar 24, 2023, 4:45:47 PM CET
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2023-03-24 16:45:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207585
;
-- Mar 24, 2023, 4:46:00 PM CET
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2023-03-24 16:46:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215804
;
-- Mar 24, 2023, 4:46:02 PM CET
INSERT INTO t_alter_column values('testuudet','AltTestUU_UU','VARCHAR(36)',null,'NULL')
;
-- Mar 24, 2023, 4:46:02 PM CET
INSERT INTO t_alter_column values('testuudet','AltTestUU_UU',null,'NULL',null)
;
-- Mar 24, 2023, 4:46:41 PM CET
INSERT INTO TestUUDet (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,TestUUDet_UU,Name,TestUU_UU) VALUES (0,0,TO_TIMESTAMP('2023-03-24 16:46:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-24 16:46:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','07218035-18bc-4593-b76d-d498fafc9f0b','Detail Record','4e148b89-bdd9-48a6-8a8a-7609092f965c')
;
-- Mar 24, 2023, 5:02:33 PM CET
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=30, XPosition=1,Updated=TO_TIMESTAMP('2023-03-24 17:02:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207594
;
-- Mar 24, 2023, 5:02:33 PM CET
UPDATE AD_Field SET SeqNo=40,Updated=TO_TIMESTAMP('2023-03-24 17:02:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207591
;
-- Mar 24, 2023, 5:02:33 PM CET
UPDATE AD_Field SET SeqNo=50,Updated=TO_TIMESTAMP('2023-03-24 17:02:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207593
;
-- Mar 24, 2023, 5:02:33 PM CET
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2023-03-24 17:02:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207592
;
-- Mar 29, 2023, 8:16:07 PM CEST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,Help,PrintName,EntityType,AD_Element_UU) VALUES (203799,0,0,'Y',TO_TIMESTAMP('2023-03-29 20:15:52','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-29 20:15:52','YYYY-MM-DD HH24:MI:SS'),100,'TestUU_UUs','Multi TestUU',NULL,NULL,'Multi TestUU','D','fa2ddd35-2dfe-4771-ad64-a276e878427c')
;
-- Mar 29, 2023, 8:16:45 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215809,0.0,'Multi TestUU',200384,'TestUU_UUs',2000,'N','N','Y','N','N',0,'N',200162,200236,0,0,'Y',TO_TIMESTAMP('2023-03-29 20:16:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-29 20:16:44','YYYY-MM-DD HH24:MI:SS'),100,203799,'Y','N','D','N','N','N','Y','efa1b7d2-8200-4bba-861b-87725ccf2099','Y','N','N','N','N')
;
-- Mar 29, 2023, 8:17:07 PM CEST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2023-03-29 20:17:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215809
;
-- Mar 29, 2023, 8:17:09 PM CEST
ALTER TABLE TestUUDet ADD COLUMN TestUU_UUs VARCHAR(2000) DEFAULT NULL
;
-- Mar 29, 2023, 8:17:31 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207599,'Multi TestUU',200349,215809,'Y',2000,70,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-29 20:17:31','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-29 20:17:31','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','c1927d34-4a3e-4207-9f0a-e0748be9ad67','Y',70,5)
;
-- Mar 29, 2023, 8:17:47 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, XPosition=1,Updated=TO_TIMESTAMP('2023-03-29 20:17:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207599
;
-- Mar 29, 2023, 8:17:47 PM CEST
UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2023-03-29 20:17:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207588
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_Element SET Name='Multi Test UU', PrintName='Multi Test UU',Updated=TO_TIMESTAMP('2023-03-29 20:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=203799
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_Column SET ColumnName='TestUU_UUs', Name='Multi Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203799
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_Process_Para SET ColumnName='TestUU_UUs', Name='Multi Test UU', Description=NULL, Help=NULL, AD_Element_ID=203799 WHERE UPPER(ColumnName)='TESTUU_UUS' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_Process_Para SET ColumnName='TestUU_UUs', Name='Multi Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203799 AND IsCentrallyMaintained='Y'
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_InfoColumn SET ColumnName='TestUU_UUs', Name='Multi Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203799 AND IsCentrallyMaintained='Y'
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_Field SET Name='Multi Test UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=203799) AND IsCentrallyMaintained='Y'
;
-- Mar 29, 2023, 8:18:17 PM CEST
UPDATE AD_PrintFormatItem SET PrintName='Multi Test UU', Name='Multi Test UU' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=203799)
;
-- Mar 29, 2023, 8:18:34 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207600,'Multi Test UU',200350,215809,'Y',2000,70,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-29 20:18:34','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-29 20:18:34','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','e35c3192-8704-490f-a79a-88b746588d64','Y',70,5)
;
-- Mar 29, 2023, 8:18:42 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, XPosition=1,Updated=TO_TIMESTAMP('2023-03-29 20:18:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207600
;
-- Mar 29, 2023, 8:18:42 PM CEST
UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2023-03-29 20:18:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207595
;

View File

@ -40,7 +40,7 @@ public class Callout_AD_Column extends CalloutEngine
// IDEMPIERE-1011
if (PO.getUUIDColumnName(column.getAD_Table().getTableName()).equals(column.getColumnName())) {
// UUID column
column.setAD_Reference_ID(DisplayType.String);
column.setAD_Reference_ID(DisplayType.UUID);
column.setAD_Val_Rule_ID(0);
column.setAD_Reference_Value_ID(0);
column.setFieldLength(36);

View File

@ -109,7 +109,7 @@ public class ColumnEncryption extends SvrProcess {
// Can it be enabled?
if (column.isKey() || column.isParent() || column.isStandardColumn() || column.isUUIDColumn()
|| column.isVirtualColumn() || column.isIdentifier()
|| column.isTranslated() || DisplayType.isLookup(dt)
|| column.isTranslated() || DisplayType.isLookup(dt) || DisplayType.isUUID(dt)
|| DisplayType.isLOB(dt) || DisplayType.isDate(dt) || DisplayType.isNumeric(dt)
|| "DocumentNo".equalsIgnoreCase(column.getColumnName())
|| "Value".equalsIgnoreCase(column.getColumnName())

View File

@ -29,14 +29,6 @@ import static org.compiere.model.SystemIDs.REFERENCE_AD_LANGUAGE;
import static org.compiere.model.SystemIDs.REFERENCE_AD_USER;
import static org.compiere.model.SystemIDs.REFERENCE_AD_USER_SALESREP;
import static org.compiere.model.SystemIDs.REFERENCE_C_DOCTYPE;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_BUTTON;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_DATE;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_LIST;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_NUMBER;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_STRING;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TABLE;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TABLEDIR;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_UUID;
import static org.compiere.model.SystemIDs.REFERENCE_DOCUMENTACTION;
import static org.compiere.model.SystemIDs.REFERENCE_DOCUMENTSTATUS;
import static org.compiere.model.SystemIDs.REFERENCE_POSTED;
@ -50,6 +42,7 @@ import org.compiere.model.MProcessPara;
import org.compiere.model.MTable;
import org.compiere.model.MTableIndex;
import org.compiere.model.M_Element;
import org.compiere.model.PO;
import org.compiere.model.Query;
import org.compiere.model.X_AD_WF_Node;
import org.compiere.model.X_AD_Workflow;
@ -494,7 +487,7 @@ public class CreateTable extends SvrProcess {
column.setIsParent(true);
}
else if (columnName.equals("Value") || columnName.equals("Name") || columnName.equals("DocumentNo")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_STRING);
column.setAD_Reference_ID(DisplayType.String);
column.setIsUpdateable(true);
column.setIsSelectionColumn(true);
@ -513,7 +506,7 @@ public class CreateTable extends SvrProcess {
column.setFieldLength(length);
}
else if (columnName.equals("Description") || columnName.equals("Help")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_STRING);
column.setAD_Reference_ID(DisplayType.String);
column.setIsUpdateable(true);
int length = LENGTH_0;
if (columnName.equals("Description"))
@ -525,21 +518,21 @@ public class CreateTable extends SvrProcess {
column.setIsTranslated(true);
}
else if (columnName.equals("C_Currency_ID")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_TABLEDIR);
column.setAD_Reference_ID(DisplayType.TableDir);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_22);
column.setDefaultValue("@C_Currency_ID@");
}
else if (columnName.equals("DateAcct") || columnName.equals("DateTrx")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_DATE);
column.setAD_Reference_ID(DisplayType.Date);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_7);
column.setDefaultValue("@#Date@");
}
else if (columnName.equals("DocAction")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_BUTTON);
column.setAD_Reference_ID(DisplayType.Button);
column.setAD_Reference_Value_ID(REFERENCE_DOCUMENTACTION);
column.setIsMandatory(true);
column.setIsUpdateable(true);
@ -548,7 +541,7 @@ public class CreateTable extends SvrProcess {
column.setIsToolbarButton(MColumn.ISTOOLBARBUTTON_Window);
}
else if (columnName.equals("DocStatus")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_LIST);
column.setAD_Reference_ID(DisplayType.List);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_2);
@ -556,24 +549,24 @@ public class CreateTable extends SvrProcess {
column.setDefaultValue(DocAction.STATUS_Drafted);
}
else if (columnName.equals("ProcessedOn")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_NUMBER);
column.setAD_Reference_ID(DisplayType.Number);
column.setFieldLength(LENGTH_20);
}
else if (columnName.equals("C_DocType_ID")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_TABLEDIR);
column.setAD_Reference_ID(DisplayType.TableDir);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_22);
}
else if (columnName.equals("C_DocTypeTarget_ID")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_TABLE);
column.setAD_Reference_ID(DisplayType.Table);
column.setAD_Reference_Value_ID(REFERENCE_C_DOCTYPE);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_22);
}
else if (columnName.equals("Posted")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_BUTTON);
column.setAD_Reference_ID(DisplayType.Button);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_1);
@ -596,8 +589,8 @@ public class CreateTable extends SvrProcess {
column.setIsMandatory(true);
column.setFieldLength(LENGTH_22);
}
else if (element.getColumnName().equalsIgnoreCase(table.getTableName() + "_UU")) { // UUID column
column.setAD_Reference_ID(REFERENCE_DATATYPE_UUID);
else if (element.getColumnName().equalsIgnoreCase(PO.getUUIDColumnName(table.getTableName()))) { // UUID column
column.setAD_Reference_ID(DisplayType.UUID);
column.setFieldLength(LENGTH_36);
}
else if (element.getColumnName().equalsIgnoreCase((table.getTableName().substring(0, table.getTableName().length()-4)) + "_ID")) { // ID of parent table (for translation tables)

View File

@ -50,6 +50,11 @@ public abstract class AbstractModelFactory implements IModelFactory {
{
return null;
}
MTable table = MTable.get(Env.getCtx(), tableName);
if (table != null && table.isUUIDKeyTable())
{
return null;
}
boolean errorLogged = false;
try

View File

@ -25,6 +25,9 @@ import org.compiere.util.Language;
public interface IDisplayTypeFactory {
public boolean isID(int displayType);
public default boolean isUUID(int displayType) {
return false;
};
public boolean isNumeric(int displayType);
public Integer getDefaultPrecision(int displayType);
public boolean isText(int displayType);

View File

@ -27,6 +27,7 @@ import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.MAccount;
import org.compiere.model.MAttributeSetInstance;
import org.compiere.model.MChart;
import org.compiere.model.MColumn;
import org.compiere.model.MImage;
import org.compiere.model.MLocation;
import org.compiere.model.MLocator;
@ -106,7 +107,7 @@ public class GenericZoomProvider implements IZoomProvider {
+ " AND t.IsView='N' "); // not views
if (detailedZoom) {
sqlb.append(
" AND ( ( c.ColumnName=? AND c.AD_Reference_ID=19) ");
" AND ( ( c.ColumnName=? AND c.AD_Reference_ID IN (?,?)) "); // TableDir/TableDirUU
if (MLocation.COLUMNNAME_C_Location_ID.equals(po.get_KeyColumns()[0]))
sqlb.append(" OR c.AD_Reference_ID=").append(DisplayType.Location);
else if (MAccount.COLUMNNAME_C_ValidCombination_ID.equals(po.get_KeyColumns()[0]))
@ -121,8 +122,8 @@ public class GenericZoomProvider implements IZoomProvider {
sqlb.append(" OR c.AD_Reference_ID=").append(DisplayType.PAttribute);
else if (MChart.COLUMNNAME_AD_Chart_ID.equals(po.get_KeyColumns()[0]))
sqlb.append(" OR c.AD_Reference_ID=").append(DisplayType.Chart);
sqlb.append(" OR ( c.ColumnName=? AND c.AD_Reference_ID=30 AND c.AD_Reference_Value_ID IS NULL ) "
+ " OR ( c.AD_Reference_ID IN (18, 30) AND c.AD_Reference_Value_ID=r.AD_Reference_ID AND tr.TableName=? ) ) ");
sqlb.append(" OR ( c.ColumnName=? AND c.AD_Reference_ID IN (?,?) AND c.AD_Reference_Value_ID IS NULL ) " // Search/SearchUU
+ " OR ( c.AD_Reference_ID IN (?,?,?,?) AND c.AD_Reference_Value_ID=r.AD_Reference_ID AND tr.TableName=? ) ) "); // Table/Search/Table/SearchUU
} else {
sqlb.append(" AND c.ColumnName=? ");
}
@ -140,7 +141,15 @@ public class GenericZoomProvider implements IZoomProvider {
}
pstmt.setString(index++, po.get_KeyColumns()[0]);
if (detailedZoom) {
pstmt.setInt(index++, DisplayType.TableDir);
pstmt.setInt(index++, DisplayType.TableDirUU);
pstmt.setString(index++, po.get_KeyColumns()[0]);
pstmt.setInt(index++, DisplayType.Search);
pstmt.setInt(index++, DisplayType.SearchUU);
pstmt.setInt(index++, DisplayType.Table);
pstmt.setInt(index++, DisplayType.TableUU);
pstmt.setInt(index++, DisplayType.Search);
pstmt.setInt(index++, DisplayType.SearchUU);
pstmt.setString(index++, po.get_TableName());
}
rs = pstmt.executeQuery();
@ -226,10 +235,23 @@ public class GenericZoomProvider implements IZoomProvider {
break;
}
query.addRestriction(targetTableName + "." + targetColumnName + "=" + po.get_ID());
MColumn column = table.getColumn(targetColumnName);
String refTableName = column.getReferenceTableName();
MTable refTable = MTable.get(ctx, refTableName);
StringBuilder restriction = new StringBuilder(targetTableName)
.append(".")
.append(targetColumnName)
.append("=");
if (refTable.isUUIDKeyTable()) {
restriction.append(DB.TO_STRING(po.get_UUID()));
query.setZoomValue(po.get_UUID());
} else {
restriction.append(po.get_ID());
query.setZoomValue(po.get_ID());
}
query.addRestriction(restriction.toString());
query.setZoomTableName(targetTableName);
query.setZoomColumnName(targetColumnName);
query.setZoomValue(po.get_ID());
String accessLevel = table.getAccessLevel();
if ( clientID != 0

View File

@ -121,7 +121,7 @@ public class UUIDGenerator extends SvrProcess {
}
mColumn.setAD_Element_ID(AD_Element_ID);
mColumn.setColumnName(columnName);
mColumn.setAD_Reference_ID(DisplayType.String);
mColumn.setAD_Reference_ID(DisplayType.UUID);
mColumn.setEntityType("U");
mColumn.setFieldLength(36);
mColumn.setName(columnName);

View File

@ -1858,7 +1858,7 @@ public class GridField
{
if (m_parentValue != null)
return m_parentValue.booleanValue();
if (!DisplayType.isID(m_vo.displayType) || m_vo.TabNo == 0)
if ( ( !DisplayType.isID(m_vo.displayType) && !DisplayType.isUUID(m_vo.displayType) ) || m_vo.TabNo == 0)
m_parentValue = Boolean.FALSE;
else
{

View File

@ -365,6 +365,8 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
if (m_vo.getFields() == null)
return false;
String uuidExpectedCol = PO.getUUIDColumnName(getTableName());
String uuidColumnName = null;
// Add Fields
for (int f = 0; f < m_vo.getFields().size(); f++)
{
@ -379,6 +381,8 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
if (field.isKey()) {
setKeyColumnName(columnName);
}
if (uuidExpectedCol.equals(columnName))
uuidColumnName = columnName;
// Parent Column(s)
if (field.isParentColumn())
m_parents.add(columnName);
@ -419,6 +423,10 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
}
} // for all fields
if (Util.isEmpty(getKeyColumnName()) && getParentColumnNames().size() == 0 && uuidColumnName != null) {
setKeyColumnName(uuidColumnName);
}
if (! m_mTable.getTableName().equals(X_AD_PInstance_Log.Table_Name)) { // globalqss, bug 1662433
// Add Standard Fields
if (m_mTable.getField("Created") == null)
@ -795,35 +803,14 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
return query.getWhereClause(true);
}
String refColName = null;
// Find Reference Column e.g. BillTo_ID -> C_BPartner_Location_ID
String sql = "SELECT cc.ColumnName "
final String sql1 = "SELECT cc.ColumnName "
+ "FROM AD_Column c"
+ " INNER JOIN AD_Ref_Table r ON (c.AD_Reference_Value_ID=r.AD_Reference_ID)"
+ " INNER JOIN AD_Column cc ON (r.AD_Key=cc.AD_Column_ID) "
+ "WHERE c.AD_Reference_ID IN (18,30)" // Table/Search
+ "WHERE c.AD_Reference_ID IN (?,?,?,?)"
+ " AND c.ColumnName=?";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt.setString(1, colName);
rs = pstmt.executeQuery();
if (rs.next())
refColName = rs.getString(1);
}
catch (SQLException e)
{
log.log(Level.SEVERE, "(ref) - Column=" + colName, e);
return query.getWhereClause();
}
finally
{
DB.close(rs, pstmt);
rs = null;
pstmt = null;
}
String refColName = DB.getSQLValueStringEx(null, sql1, DisplayType.Table, DisplayType.Search, DisplayType.TableUU, DisplayType.SearchUU);
// Reference Column found
if (refColName != null)
{
@ -837,41 +824,20 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
}
// Column NOT in Tab - create EXISTS subquery
String tableName = null;
String tabKeyColumn = getKeyColumnName();
sql = "SELECT t.TableName "
final String sql2 = "SELECT t.TableName "
+ "FROM AD_Column c"
+ " INNER JOIN AD_Table t ON (c.AD_Table_ID=t.AD_Table_ID) "
+ "WHERE c.ColumnName=? AND IsKey='Y'" // #1 Link Column
+ " AND EXISTS (SELECT * FROM AD_Column cc"
+ " WHERE cc.AD_Table_ID=t.AD_Table_ID AND cc.ColumnName=?)"; // #2 Tab Key Column
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt.setString(1, colName);
pstmt.setString(2, tabKeyColumn);
rs = pstmt.executeQuery();
if (rs.next())
tableName = rs.getString(1);
}
catch (SQLException e)
{
log.log(Level.SEVERE, "Column=" + colName + ", Key=" + tabKeyColumn, e);
return null;
}
finally
{
DB.close(rs, pstmt);
rs = null;
pstmt = null;
}
String tableName = DB.getSQLValueStringEx(null, sql2, colName, tabKeyColumn);
// Special Reference Handling
if (tabKeyColumn.equals("AD_Reference_ID"))
{
// Column=AccessLevel, Key=AD_Reference_ID, Query=AccessLevel='6'
sql = "SELECT AD_Reference_ID FROM AD_Column WHERE ColumnName=?";
int AD_Reference_ID = DB.getSQLValue(null, sql, colName);
final String sql3 = "SELECT AD_Reference_ID FROM AD_Column WHERE ColumnName=?";
int AD_Reference_ID = DB.getSQLValueEx(null, sql3, colName);
return "AD_Reference_ID=" + AD_Reference_ID;
}

View File

@ -0,0 +1,149 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for TestUUDet
* @author iDempiere (generated)
* @version Release 11
*/
public interface I_TestUUDet
{
/** TableName=TestUUDet */
public static final String Table_Name = "TestUUDet";
/** AD_Table_ID=200384 */
public static final int Table_ID = 200384;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Tenant.
* Tenant for this installation.
*/
public int getAD_Client_ID();
/** Column name AD_Org_ID */
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization.
* Organizational entity within tenant
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization.
* Organizational entity within tenant
*/
public int getAD_Org_ID();
/** Column name AltTestUU_UU */
public static final String COLUMNNAME_AltTestUU_UU = "AltTestUU_UU";
/** Set Alternate Test UU */
public void setAltTestUU_UU (String AltTestUU_UU);
/** Get Alternate Test UU */
public String getAltTestUU_UU();
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
/** Get Created.
* Date this record was created
*/
public Timestamp getCreated();
/** Column name CreatedBy */
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
/** Get Created By.
* User who created this records
*/
public int getCreatedBy();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
/** Set Active.
* The record is active in the system
*/
public void setIsActive (boolean IsActive);
/** Get Active.
* The record is active in the system
*/
public boolean isActive();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
/** Set Name.
* Alphanumeric identifier of the entity
*/
public void setName (String Name);
/** Get Name.
* Alphanumeric identifier of the entity
*/
public String getName();
/** Column name TestUUDet_UU */
public static final String COLUMNNAME_TestUUDet_UU = "TestUUDet_UU";
/** Set TestUUDet_UU */
public void setTestUUDet_UU (String TestUUDet_UU);
/** Get TestUUDet_UU */
public String getTestUUDet_UU();
/** Column name TestUU_UU */
public static final String COLUMNNAME_TestUU_UU = "TestUU_UU";
/** Set Test UU */
public void setTestUU_UU (String TestUU_UU);
/** Get Test UU */
public String getTestUU_UU();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -371,7 +371,7 @@ public class MColumn extends X_AD_Column implements ImmutablePOSupport
}
}
if (displayType == DisplayType.Table && getAD_Reference_Value_ID() <= 0)
if ((displayType == DisplayType.Table || displayType == DisplayType.TableUU) && getAD_Reference_Value_ID() <= 0)
{
log.saveError("FillMandatory", Msg.getElement(getCtx(), "AD_Reference_Value_ID"));
return false;
@ -538,6 +538,14 @@ public class MColumn extends X_AD_Column implements ImmutablePOSupport
set_Value(COLUMNNAME_AD_InfoWindow_ID, null);
}
if (DisplayType.isUUID(getAD_Reference_ID())) {
set_Value(COLUMNNAME_FieldLength, 36);
if (! getColumnName().endsWith("_UU")) {
log.saveError("Error", Msg.getMsg(getCtx(), "UUColumnsMustEndWithUU"));
return false;
}
}
return true;
} // beforeSave
@ -743,9 +751,9 @@ public class MColumn extends X_AD_Column implements ImmutablePOSupport
public String getReferenceTableName() {
String foreignTable = null;
int refid = getAD_Reference_ID();
if (DisplayType.TableDir == refid || (DisplayType.Search == refid && getAD_Reference_Value_ID() == 0)) {
if (DisplayType.TableDir == refid || DisplayType.TableDirUU == refid || ((DisplayType.Search == refid || DisplayType.SearchUU == refid) && getAD_Reference_Value_ID() == 0)) {
foreignTable = getColumnName().substring(0, getColumnName().length()-3);
} else if (DisplayType.Table == refid || DisplayType.Search == refid) {
} else if (DisplayType.Table == refid || DisplayType.TableUU == refid || DisplayType.Search == refid || DisplayType.SearchUU == refid) {
MReference ref = MReference.get(getCtx(), getAD_Reference_Value_ID(), get_TrxName());
if (MReference.VALIDATIONTYPE_TableValidation.equals(ref.getValidationType())) {
int cnt = DB.getSQLValueEx(get_TrxName(), "SELECT COUNT(*) FROM AD_Ref_Table WHERE AD_Reference_ID=?", getAD_Reference_Value_ID());
@ -969,8 +977,15 @@ public class MColumn extends X_AD_Column implements ImmutablePOSupport
DatabaseKey dbForeignKey = htForeignKeys.get(key);
if (dbForeignKey.getKeyColumns()[0].equalsIgnoreCase(column.getColumnName()))
{
DatabaseKey primaryKey = getPrimaryKey(md, referenceTableName);
if (primaryKey != null)
DatabaseKey primaryKey = null;
String uuidKey = null;
if (column.getColumnName().endsWith("_UU")) {
uuidKey = PO.getUUIDColumnName(referenceTableName);
} else {
primaryKey = MColumn.getPrimaryKey(md, referenceTableName);
}
if (primaryKey != null || uuidKey != null)
{
fkConstraintSql.append(DB.SQLSTATEMENT_SEPARATOR);
fkConstraintSql.append("ALTER TABLE ").append(table.getTableName());
@ -1006,12 +1021,16 @@ public class MColumn extends X_AD_Column implements ImmutablePOSupport
StringBuilder fkConstraint = new StringBuilder();
fkConstraint.append("CONSTRAINT ").append(fkConstraintName);
fkConstraint.append(" FOREIGN KEY (").append(column.getColumnName()).append(") REFERENCES ");
fkConstraint.append(primaryKey.getKeyTable()).append("(").append(primaryKey.getKeyColumns()[0]);
for (int i = 1; i < primaryKey.getKeyColumns().length; i++)
{
if (primaryKey.getKeyColumns()[i] == null)
break;
fkConstraint.append(", ").append(primaryKey.getKeyColumns()[i]);
if (uuidKey != null) {
fkConstraint.append(referenceTableName).append("(").append(uuidKey);
} else {
fkConstraint.append(primaryKey.getKeyTable()).append("(").append(primaryKey.getKeyColumns()[0]);
for (int i = 1; i < primaryKey.getKeyColumns().length; i++)
{
if (primaryKey.getKeyColumns()[i] == null)
break;
fkConstraint.append(", ").append(primaryKey.getKeyColumns()[i]);
}
}
fkConstraint.append(")");
@ -1124,9 +1143,15 @@ public class MColumn extends X_AD_Column implements ImmutablePOSupport
String referenceTableName = column.getReferenceTableName();
if (referenceTableName != null)
{
DatabaseKey primaryKey = MColumn.getPrimaryKey(md, referenceTableName);
DatabaseKey primaryKey = null;
String uuidKey = null;
if (column.getColumnName().endsWith("_UU")) {
uuidKey = PO.getUUIDColumnName(referenceTableName);
} else {
primaryKey = MColumn.getPrimaryKey(md, referenceTableName);
}
if (primaryKey != null)
if (primaryKey != null || uuidKey != null)
{
String fkConstraintName = column.getFKConstraintName();
if (fkConstraintName == null || fkConstraintName.trim().length() == 0)
@ -1147,12 +1172,16 @@ public class MColumn extends X_AD_Column implements ImmutablePOSupport
StringBuilder fkConstraint = new StringBuilder();
fkConstraint.append("CONSTRAINT ").append(fkConstraintName);
fkConstraint.append(" FOREIGN KEY (").append(column.getColumnName()).append(") REFERENCES ");
fkConstraint.append(primaryKey.getKeyTable()).append("(").append(primaryKey.getKeyColumns()[0]);
for (int i = 1; i < primaryKey.getKeyColumns().length; i++)
{
if (primaryKey.getKeyColumns()[i] == null)
break;
fkConstraint.append(", ").append(primaryKey.getKeyColumns()[i]);
if (uuidKey != null) {
fkConstraint.append(referenceTableName).append("(").append(uuidKey);
} else {
fkConstraint.append(primaryKey.getKeyTable()).append("(").append(primaryKey.getKeyColumns()[0]);
for (int i = 1; i < primaryKey.getKeyColumns().length; i++)
{
if (primaryKey.getKeyColumns()[i] == null)
break;
fkConstraint.append(", ").append(primaryKey.getKeyColumns()[i]);
}
}
fkConstraint.append(")");

View File

@ -584,7 +584,11 @@ public final class MLookup extends Lookup implements Serializable
}
else
{
String value = rs.getString(2);
String value;
if (m_info.KeyColumn.endsWith("_UU"))
value = rs.getString(1);
else
value = rs.getString(2);
ValueNamePair p = new ValueNamePair(value, name.toString());
if (saveInCache) // save if
m_lookup.put(value, p);
@ -720,7 +724,11 @@ public final class MLookup extends Lookup implements Serializable
}
else
{
String value = rs.getString(2);
String value;
if (m_info.KeyColumn.endsWith("_UU"))
value = rs.getString(1);
else
value = rs.getString(2);
ValueNamePair p = new ValueNamePair(value, name.toString());
vnpCache.put(p.getValue(), p);
Integer idx = notInCaches.get(p.getValue());
@ -1176,7 +1184,11 @@ public final class MLookup extends Lookup implements Serializable
}
else
{
String value = rs.getString(2);
String value;
if (m_info.KeyColumn.endsWith("_UU"))
value = rs.getString(1);
else
value = rs.getString(2);
ValueNamePair p = new ValueNamePair(value, name.toString());
m_lookup.put(value, p);
vnpCache.add(p);

View File

@ -194,7 +194,8 @@ public class MLookupFactory
needToAddSecurity = false;
}
// Table or Search with Reference_Value
else if ((AD_Reference_ID == DisplayType.Table || AD_Reference_ID == DisplayType.Search
else if ((AD_Reference_ID == DisplayType.Table || AD_Reference_ID == DisplayType.TableUU
|| AD_Reference_ID == DisplayType.Search || AD_Reference_ID == DisplayType.SearchUU
|| AD_Reference_ID == DisplayType.ChosenMultipleSelectionTable || AD_Reference_ID == DisplayType.ChosenMultipleSelectionSearch)
&& AD_Reference_Value_ID != 0)
{
@ -462,10 +463,10 @@ public class MLookupFactory
}
StringBuilder realSQL = new StringBuilder("SELECT ");
if (!KeyColumn.endsWith("_ID"))
if (!KeyColumn.endsWith("_ID") && !KeyColumn.endsWith("_UU"))
realSQL.append("NULL,");
boolean showID = DisplayColumn.equals(TableName+"_ID");
boolean showID = DisplayColumn.equals(TableName+"_ID") || DisplayColumn.equals(PO.getUUIDColumnName(TableName));
ArrayList<LookupDisplayColumn> list = null;
if (showID) {
@ -497,7 +498,7 @@ public class MLookupFactory
if (IsTranslated && !Env.isBaseLanguage(language, TableName))
{
realSQL.append(TableName).append(".").append(KeyColumn).append(",");
if (KeyColumn.endsWith("_ID"))
if (KeyColumn.endsWith("_ID") || KeyColumn.endsWith("_UU"))
realSQL.append("NULL,");
if (isValueDisplayed)
realSQL.append("NVL(").append(TableName).append(".Value,'-1') || '").append(separator).append("' || ");
@ -525,7 +526,7 @@ public class MLookupFactory
else
{
realSQL.append(TableName).append(".").append(KeyColumn).append(",");
if (KeyColumn.endsWith("_ID"))
if (KeyColumn.endsWith("_ID") || KeyColumn.endsWith("_UU"))
realSQL.append("NULL,");
if (isValueDisplayed)
realSQL.append("NVL(").append(TableName).append(".Value,'-1') || '").append(separator).append("' || ");
@ -672,7 +673,7 @@ public class MLookupFactory
int Column_ID = MColumn.getColumn_ID(BaseTable, BaseColumn);
MColumn column = MColumn.get(Env.getCtx(), Column_ID);
boolean showID = DisplayColumn.equals(TableName+"_ID");
boolean showID = DisplayColumn.equals(TableName+"_ID") || DisplayColumn.equals(PO.getUUIDColumnName(TableName));
if (showID) {
if (column.isVirtualColumn())
return getLookup_TableDirEmbed(language, DisplayColumn, BaseTable, column.getColumnSQL());
@ -762,9 +763,9 @@ public class MLookupFactory
static private MLookupInfo getLookup_TableDir (Properties ctx, Language language,
int WindowNo, String ColumnName)
{
if (!ColumnName.endsWith("_ID"))
if (!ColumnName.endsWith("_ID") && !ColumnName.endsWith("_UU"))
{
String error = "Key does not end with '_ID': " + ColumnName;
String error = "Key does not end with '_ID' or '_UU': " + ColumnName;
s_log.log(Level.SEVERE, error, new Exception(error));
return null;
}
@ -896,7 +897,8 @@ public class MLookupFactory
displayColumn.append(DB.TO_CHAR(columnSQL, ldc.DisplayType, language.getAD_Language()));
}
// Table
else if ((ldc.DisplayType == DisplayType.Table || ldc.DisplayType == DisplayType.Search) && ldc.AD_Reference_ID != 0)
else if ((ldc.DisplayType == DisplayType.Table || ldc.DisplayType == DisplayType.TableUU
|| ldc.DisplayType == DisplayType.Search || ldc.DisplayType == DisplayType.SearchUU) && ldc.AD_Reference_ID != 0)
{
String embeddedSQL;
if (ldc.IsVirtual)
@ -907,8 +909,8 @@ public class MLookupFactory
displayColumn.append("(").append(embeddedSQL).append(")");
}
// TableDir
else if ((ldc.DisplayType == DisplayType.TableDir || ldc.DisplayType == DisplayType.Search)
&& ldc.ColumnName.endsWith("_ID"))
else if ((ldc.DisplayType == DisplayType.TableDir || ldc.DisplayType == DisplayType.Search) && ldc.ColumnName.endsWith("_ID")
|| (ldc.DisplayType == DisplayType.TableDirUU || ldc.DisplayType == DisplayType.SearchUU) && ldc.ColumnName.endsWith("_UU"))
{
String embeddedSQL;
if (ldc.IsVirtual)

View File

@ -362,17 +362,17 @@ public class MProcessPara extends X_AD_Process_Para implements ImmutablePOSuppor
public String getReferenceTableName() {
String foreignTable = null;
if (DisplayType.TableDir == getAD_Reference_ID()
|| (DisplayType.Search == getAD_Reference_ID() && getAD_Reference_Value_ID() == 0)) {
int refid = getAD_Reference_ID();
if (DisplayType.TableDir == refid || DisplayType.TableDirUU == refid || ((DisplayType.Search == refid || DisplayType.SearchUU == refid) && getAD_Reference_Value_ID() == 0)) {
foreignTable = getColumnName().substring(0, getColumnName().length()-3);
} else if (DisplayType.Table == getAD_Reference_ID() || DisplayType.Search == getAD_Reference_ID()) {
} else if (DisplayType.Table == refid || DisplayType.TableUU == refid || DisplayType.Search == refid || DisplayType.SearchUU == refid) {
MReference ref = MReference.get(getCtx(), getAD_Reference_Value_ID(), get_TrxName());
if (MReference.VALIDATIONTYPE_TableValidation.equals(ref.getValidationType())) {
MRefTable rt = MRefTable.get(getCtx(), getAD_Reference_Value_ID(), get_TrxName());
if (rt != null)
foreignTable = rt.getAD_Table().getTableName();
}
} else if (DisplayType.isList(getAD_Reference_ID())) {
} else if (DisplayType.isList(refid)) {
foreignTable = "AD_Ref_List";
}

View File

@ -407,6 +407,9 @@ public class MQuery implements Serializable, Cloneable
{
String tableName = getZoomColumnName(columnName);
int index = tableName.lastIndexOf("_ID");
if (index != -1)
return tableName.substring(0, index);
index = tableName.lastIndexOf("_UU");
if (index != -1)
return tableName.substring(0, index);
return tableName;

View File

@ -66,7 +66,7 @@ public class MTable extends X_AD_Table implements ImmutablePOSupport
/**
*
*/
private static final long serialVersionUID = -8036408095622443747L;
private static final long serialVersionUID = -4206879140460545905L;
public final static int MAX_OFFICIAL_ID = 999999;
@ -486,13 +486,22 @@ public class MTable extends X_AD_Table implements ImmutablePOSupport
return m_KeyColumns;
} // getKeyColumns
/**
* @return true if table key is _ID key.
*/
public boolean isIDKeyTable()
{
String idColName = getTableName() + "_ID";
return (getKeyColumns() != null && getKeyColumns().length == 1 && getKeyColumns()[0].equals(idColName));
}
/**
* @return true if table key is _UU instead of _ID or composite parent key.
*/
public boolean isUUIDKeyTable()
{
String uuColName = PO.getUUIDColumnName(getTableName());
return (getKeyColumns() != null && getKeyColumns()[0].equals(uuColName));
return (getKeyColumns() != null && getKeyColumns().length == 1 && getKeyColumns()[0].equals(uuColName));
}
/**

View File

@ -223,10 +223,18 @@ public class MZoomCondition extends X_AD_ZoomCondition implements ImmutablePOSup
{
window.initTab(gTab.getTabNo());
GridTab parentTab = gTab.getParentTab();
int parentId = -1;
if (!Util.isEmpty(gTab.getLinkColumnName()))
parentId = DB.getSQLValue(null, "SELECT " + gTab.getLinkColumnName() + " FROM " + gTab.getTableName() + " WHERE " + query.getWhereClause());
if (parentId <= 0) {
Object parentId = null;
if (!Util.isEmpty(gTab.getLinkColumnName())) {
StringBuilder sql = new StringBuilder("SELECT ").append(gTab.getLinkColumnName()).append(" FROM ").append(gTab.getTableName()).append(" WHERE ").append(query.getWhereClause());
if (gTab.getLinkColumnName().endsWith("_UU")) {
parentId = DB.getSQLValueString(null, sql.toString());
} else {
int tmpId = DB.getSQLValue(null, sql.toString());
if (tmpId > 0)
parentId = Integer.valueOf(tmpId);
}
}
if (parentId == null) {
if (Util.isEmpty(parentTab.getKeyColumnName()))
parentTab.initTab(false);
// no parent link -- search in context of window
@ -235,7 +243,7 @@ public class MZoomCondition extends X_AD_ZoomCondition implements ImmutablePOSup
parentId = DB.getSQLValue(null, "SELECT " + parentTab.getKeyColumnName() + " FROM " + parentTab.getTableName()
+ " WHERE " + parentTab.getKeyColumnName() + "=" + parentctxid);
}
if (parentId <= 0)
if (parentId == null)
return 0;
}
@ -244,16 +252,34 @@ public class MZoomCondition extends X_AD_ZoomCondition implements ImmutablePOSup
window.initTab(parentTab.getTabNo());
if (parentTab.getParentTab() != null)
{
parentId = DB.getSQLValue(null, "SELECT " + parentTab.getLinkColumnName() + " FROM " + parentTab.getTableName() + " WHERE "
+ parentTab.getTableName()+"_ID="+parentId);
if (parentId <= 0) return 0;
StringBuilder sql = new StringBuilder("SELECT ").append(parentTab.getLinkColumnName())
.append(" FROM ").append(parentTab.getTableName())
.append(" WHERE ");
MTable parentTable = MTable.get(Env.getCtx(), parentTab.getTableName());
if (parentTable.isUUIDKeyTable()) {
sql.append(PO.getUUIDColumnName(parentTab.getTableName())).append("=").append(DB.TO_STRING(parentId.toString()));
} else {
sql.append(parentTab.getTableName()).append("_ID=").append(parentId);
}
parentId = null;
if (parentTab.getLinkColumnName().endsWith("_UU")) {
parentId = DB.getSQLValueString(null, sql.toString());
} else {
int tmpId = DB.getSQLValue(null, sql.toString());
if (tmpId > 0)
parentId = Integer.valueOf(tmpId);
}
if (parentId == null) return 0;
parentTab = parentTab.getParentTab();
}
else
{
if (parentTab == window.getTab(0))
{
return findZoomWindowByTableId(parentTab.getAD_Table_ID(), parentId, windowNo);
if (parentId instanceof String)
return findZoomWindowByTableIdOrUU(parentTab.getAD_Table_ID(), -1, parentId.toString(), windowNo);
else
return findZoomWindowByTableIdOrUU(parentTab.getAD_Table_ID(), ((Integer)parentId).intValue(), null, windowNo);
}
}
}
@ -313,7 +339,7 @@ public class MZoomCondition extends X_AD_ZoomCondition implements ImmutablePOSup
};
String whereClause;
if (recordUU != null)
if (table.isUUIDKeyTable())
whereClause = PO.getUUIDColumnName(table.getTableName())+"="+DB.TO_STRING(recordUU);
else
whereClause = table.getTableName() + "_ID="+recordID;

View File

@ -113,7 +113,7 @@ public abstract class PO
/**
*
*/
private static final long serialVersionUID = 1569541357840608310L;
private static final long serialVersionUID = 1672197562752270736L;
/* String key to create a new record based in UUID constructor */
public static final String UUID_NEW_RECORD = "";
@ -649,13 +649,26 @@ public abstract class PO
} // get_ValueE
/**
* Get Column Value
* @param variableName name
* @return value or ""
* Get String Value
* @param columnName
* @return String value
*/
public String get_ValueAsString (String variableName)
public String get_ValueAsString(String columnName)
{
Object value = get_Value (variableName);
int idx = get_ColumnIndex(columnName);
if (idx < 0)
return "";
return get_ValueAsString(idx);
}
/**
* Get String Value
* @param idx column index
* @return String value or ""
*/
public String get_ValueAsString(int idx)
{
Object value = get_Value(idx);
if (value == null)
return "";
return value.toString();
@ -5632,8 +5645,15 @@ public abstract class PO
String fktab = vnp.getName();
int index = get_ColumnIndex(fkcol);
if (is_new() || is_ValueChanged(index)) {
int fkval = get_ValueAsInt(index);
if (fkval > 0) {
Object fkval = null;
if (fkcol.endsWith("_UU")) {
fkval = get_ValueAsString(index);
} else {
fkval = Integer.valueOf(get_ValueAsInt(index));
}
if (fkval != null
&& ( (fkval instanceof Integer && ((Integer)fkval).intValue() > 0)
|| (fkval instanceof String && ((String)fkval).length() > 0) )) {
MTable ft = MTable.get(getCtx(), fktab);
boolean systemAccess = false;
String accessLevel = ft.getAccessLevel();
@ -5725,7 +5745,8 @@ public abstract class PO
int size = get_ColumnCount();
for (int i = 0; i < size; i++) {
int dt = p_info.getColumnDisplayType(i);
if (dt != DisplayType.ID && DisplayType.isID(dt)) {
if ( (dt != DisplayType.ID && DisplayType.isID(dt) )
|| (dt != DisplayType.UUID && DisplayType.isUUID(dt)) ) {
MColumn col = MColumn.get(p_info.getColumn(i).AD_Column_ID);
if ("AD_Client_ID".equals(col.getColumnName())) {
// ad_client_id is verified with checkValidClient

View File

@ -135,6 +135,7 @@ public class SystemIDs
public final static int REFERENCE_DATATYPE_FILENAME = 39;
public final static int REFERENCE_DATATYPE_FILEPATH = 38;
public final static int REFERENCE_DATATYPE_ID = 13;
public final static int REFERENCE_DATATYPE_UUID = 200231;
public final static int REFERENCE_DATATYPE_IMAGE = 32;
public final static int REFERENCE_DATATYPE_INTEGER = 11;
public final static int REFERENCE_DATATYPE_LIST = 17;
@ -150,18 +151,21 @@ public class SystemIDs
public final static int REFERENCE_DATATYPE_RADIOGROUP_LIST= 200152;
public final static int REFERENCE_DATATYPE_RECORD_ID = 200202;
public final static int REFERENCE_DATATYPE_ROWID = 26;
public final static int REFERENCE_DATATYPE_SCHEDULER_STATE = 200173;
public final static int REFERENCE_DATATYPE_SEARCH = 30;
public final static int REFERENCE_DATATYPE_SEARCH_UU = 200235;
public final static int REFERENCE_DATATYPE_SINGLE_SELECTION_GRID = 200127;
public final static int REFERENCE_DATATYPE_STRING = 10;
public final static int REFERENCE_DATATYPE_TABLE = 18;
public final static int REFERENCE_DATATYPE_TABLE_UU = 200233;
public final static int REFERENCE_DATATYPE_TABLEDIR = 19;
public final static int REFERENCE_DATATYPE_TABLEDIR_UU = 200234;
public final static int REFERENCE_DATATYPE_TEXT = 14;
public final static int REFERENCE_DATATYPE_TEXTLONG = 36;
public final static int REFERENCE_DATATYPE_TIME = 24;
public final static int REFERENCE_DATATYPE_TIMESTAMP_WITH_TIMEZONE = 200133;
public final static int REFERENCE_DATATYPE_TIMEZONE = 200135;
public final static int REFERENCE_DATATYPE_URL = 40;
public final static int REFERENCE_DATATYPE_UUID = 200231;
public final static int REFERENCE_DATATYPE_YES_NO = 20;
public final static int REFERENCE_ACCOUNT = 175;

View File

@ -0,0 +1,148 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
import java.sql.ResultSet;
import java.util.Properties;
/** Generated Model for TestUUDet
* @author iDempiere (generated)
* @version Release 11 - $Id$ */
@org.adempiere.base.Model(table="TestUUDet")
public class X_TestUUDet extends PO implements I_TestUUDet, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20230324L;
/** Standard Constructor */
public X_TestUUDet (Properties ctx, String TestUUDet_UU, String trxName)
{
super (ctx, TestUUDet_UU, trxName);
/** if (TestUUDet_UU == null)
{
setName (null);
setTestUU_UU (null);
} */
}
/** Standard Constructor */
public X_TestUUDet (Properties ctx, String TestUUDet_UU, String trxName, String ... virtualColumns)
{
super (ctx, TestUUDet_UU, trxName, virtualColumns);
/** if (TestUUDet_UU == null)
{
setName (null);
setTestUU_UU (null);
} */
}
/** Load Constructor */
public X_TestUUDet (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuilder sb = new StringBuilder ("X_TestUUDet[")
.append(get_UUID()).append(",Name=").append(getName()).append("]");
return sb.toString();
}
/** AltTestUU_UU AD_Reference_ID=200236 */
public static final int ALTTESTUU_UU_AD_Reference_ID=200236;
/** Set Alternate Test UU.
@param AltTestUU_UU Alternate Test UU
*/
public void setAltTestUU_UU (String AltTestUU_UU)
{
set_Value (COLUMNNAME_AltTestUU_UU, AltTestUU_UU);
}
/** Get Alternate Test UU.
@return Alternate Test UU */
public String getAltTestUU_UU()
{
return (String)get_Value(COLUMNNAME_AltTestUU_UU);
}
/** Set Name.
@param Name Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Set TestUUDet_UU.
@param TestUUDet_UU TestUUDet_UU
*/
public void setTestUUDet_UU (String TestUUDet_UU)
{
set_Value (COLUMNNAME_TestUUDet_UU, TestUUDet_UU);
}
/** Get TestUUDet_UU.
@return TestUUDet_UU */
public String getTestUUDet_UU()
{
return (String)get_Value(COLUMNNAME_TestUUDet_UU);
}
/** Set Test UU.
@param TestUU_UU Test UU
*/
public void setTestUU_UU (String TestUU_UU)
{
set_Value (COLUMNNAME_TestUU_UU, TestUU_UU);
}
/** Get Test UU.
@return Test UU */
public String getTestUU_UU()
{
return (String)get_Value(COLUMNNAME_TestUU_UU);
}
}

View File

@ -48,11 +48,15 @@ import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_QUANTITY;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_RADIOGROUP_LIST;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_RECORD_ID;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_ROWID;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_SCHEDULER_STATE;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_SEARCH;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_SEARCH_UU;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_SINGLE_SELECTION_GRID;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_STRING;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TABLE;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TABLEDIR;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TABLEDIR_UU;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TABLE_UU;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TEXT;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TEXTLONG;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TIME;
@ -102,6 +106,8 @@ public final class DisplayType
public static final int Amount = REFERENCE_DATATYPE_AMOUNT;
/** Display Type 13 ID */
public static final int ID = REFERENCE_DATATYPE_ID;
/** Display Type 200231 UUID */
public static final int UUID = REFERENCE_DATATYPE_UUID;
/** Display Type 14 Text */
public static final int Text = REFERENCE_DATATYPE_TEXT;
/** Display Type 15 Date */
@ -112,8 +118,12 @@ public final class DisplayType
public static final int List = REFERENCE_DATATYPE_LIST;
/** Display Type 18 Table */
public static final int Table = REFERENCE_DATATYPE_TABLE;
/** Display Type 200233 Table */
public static final int TableUU = REFERENCE_DATATYPE_TABLE_UU;
/** Display Type 19 TableDir */
public static final int TableDir = REFERENCE_DATATYPE_TABLEDIR;
/** Display Type 200234 */
public static final int TableDirUU = REFERENCE_DATATYPE_TABLEDIR_UU;
/** Display Type 20 YN */
public static final int YesNo = REFERENCE_DATATYPE_YES_NO;
/** Display Type 21 Location */
@ -136,6 +146,8 @@ public final class DisplayType
public static final int Quantity = REFERENCE_DATATYPE_QUANTITY;
/** Display Type 30 Search */
public static final int Search = REFERENCE_DATATYPE_SEARCH;
/** Display Type 200235 Search */
public static final int SearchUU = REFERENCE_DATATYPE_SEARCH_UU;
/** Display Type 31 Locator */
public static final int Locator = REFERENCE_DATATYPE_LOCATOR;
/** Display Type 32 Image */
@ -156,8 +168,6 @@ public final class DisplayType
public static final int FileName = REFERENCE_DATATYPE_FILENAME;
/** Display Type 40 URL */
public static final int URL = REFERENCE_DATATYPE_URL;
/** Display Type 200231 UUID */
public static final int UUID = REFERENCE_DATATYPE_UUID;
/** Display Type 42 PrinterName */
public static final int PrinterName = REFERENCE_DATATYPE_PRINTNAME;
// Candidates:
@ -180,6 +190,8 @@ public final class DisplayType
public static final int ChosenMultipleSelectionSearch = REFERENCE_DATATYPE_CHOSEN_MULTIPLE_SELECTION_SEARCH;
public static final int SchedulerState = REFERENCE_DATATYPE_SCHEDULER_STATE;
public static final int RecordID = REFERENCE_DATATYPE_RECORD_ID;
@ -262,6 +274,45 @@ public final class DisplayType
return false;
} // isID
/**
* Returns true if UUID (TableUU, SearchUU, ..).
* (stored as String)
* @param displayType Display Type
* @return true if UUID
*/
public static boolean isUUID (int displayType)
{
if (displayType == UUID || displayType == TableUU || displayType == TableDirUU
|| displayType == SearchUU)
return true;
//not custom type, don't have to check factory
if (displayType <= MTable.MAX_OFFICIAL_ID)
return false;
IServiceReferenceHolder<IDisplayTypeFactory> cache = s_displayTypeFactoryCache.get(displayType);
if (cache != null) {
IDisplayTypeFactory service = cache.getService();
if (service != null)
return service.isUUID(displayType);
else
s_displayTypeFactoryCache.remove(displayType);
}
String customTypeKey = displayType+"|isUUID";
if (! s_customDisplayTypeNegativeCache.containsKey(customTypeKey)) {
Optional<IServiceReferenceHolder<IDisplayTypeFactory>> found = getDisplayTypeFactories().stream()
.filter(e -> e.getService() != null && e.getService().isUUID(displayType))
.findFirst();
if (found.isPresent()) {
s_displayTypeFactoryCache.put(displayType, found.get());
return true;
}
s_customDisplayTypeNegativeCache.put(customTypeKey, Boolean.TRUE);
}
return false;
} // isUUID
/**
* Returns true, if DisplayType is numeric (Amount, Number, Quantity, Integer).
* (stored as BigDecimal)
@ -366,7 +417,8 @@ public final class DisplayType
|| displayType == ChosenMultipleSelectionTable
|| displayType == ChosenMultipleSelectionSearch
|| displayType == TimeZoneId
|| displayType == UUID)
|| displayType == UUID
|| displayType == TableDirUU || displayType == TableUU || displayType == SearchUU)
return true;
//not custom type, don't have to check factory
@ -487,8 +539,10 @@ public final class DisplayType
*/
public static boolean isLookup(int displayType)
{
if (displayType == List || displayType == Table
|| displayType == TableDir || displayType == Search
if (displayType == List
|| displayType == Table || displayType == TableUU
|| displayType == TableDir || displayType == TableDirUU
|| displayType == Search || displayType == SearchUU
|| displayType == RadiogroupList
|| displayType == ChosenMultipleSelectionTable
|| displayType == ChosenMultipleSelectionSearch
@ -1018,78 +1072,106 @@ public final class DisplayType
*/
public static String getDescription (int displayType)
{
if (displayType == String)
return "String";
if (displayType == Integer)
return "Integer";
if (displayType == Amount)
return "Amount";
if (displayType == ID)
return "ID";
if (displayType == Text)
return "Text";
if (displayType == Date)
return "Date";
if (displayType == DateTime)
return "DateTime";
if (displayType == List)
return "List";
if (displayType == RadiogroupList)
return "RadiogroupList";
if (displayType == Table)
return "Table";
if (displayType == TableDir)
return "TableDir";
if (displayType == YesNo)
return "YesNo";
if (displayType == Location)
return "Location";
if (displayType == Number)
return "Number";
if (displayType == Binary)
return "Binary";
if (displayType == Time)
return "Time";
if (displayType == Account)
switch (displayType) {
case Account:
return "Account";
if (displayType == RowID)
return "RowID";
if (displayType == Color)
return "Color";
if (displayType == Button)
return "Button";
if (displayType == Quantity)
return "Quantity";
if (displayType == Search)
return "Search";
if (displayType == Locator)
return "Locator";
if (displayType == Image)
return "Image";
if (displayType == Assignment)
case Amount:
return "Amount";
case Assignment:
return "Assignment";
if (displayType == Memo)
return "Memo";
if (displayType == PAttribute)
return "PAttribute";
if (displayType == TextLong)
return "TextLong";
if (displayType == CostPrice)
return "CostPrice";
if (displayType == FilePath)
return "FilePath";
if (displayType == FileName)
return "FileName";
if (displayType == URL)
return "URL";
if (displayType == PrinterName)
return "PrinterName";
if (displayType == Payment)
return "Payment";
if (displayType == Chart)
case Binary:
return "Binary";
case Button:
return "Button";
case Chart:
return "Chart";
if (displayType == UUID)
case ChosenMultipleSelectionList:
return "ChosenMultipleSelectionList";
case ChosenMultipleSelectionSearch:
return "ChosenMultipleSelectionSearch";
case ChosenMultipleSelectionTable:
return "ChosenMultipleSelectionTable";
case Color:
return "Color";
case CostPrice:
return "CostPrice";
case DashboardContent:
return "DashboardContent";
case Date:
return "Date";
case DateTime:
return "DateTime";
case FileName:
return "FileName";
case FilePath:
return "FilePath";
case ID:
return "ID";
case Image:
return "Image";
case Integer:
return "Integer";
case List:
return "List";
case Location:
return "Location";
case Locator:
return "Locator";
case Memo:
return "Memo";
case MultipleSelectionGrid:
return "MultipleSelectionGrid";
case Number:
return "Number";
case PAttribute:
return "PAttribute";
case Payment:
return "Payment";
case PrinterName:
return "PrinterName";
case Quantity:
return "Quantity";
case RadiogroupList:
return "RadiogroupList";
case RecordID:
return "RecordID";
case RowID:
return "RowID";
case SchedulerState:
return "SchedulerState";
case Search:
return "Search";
case SearchUU:
return "SearchUU";
case SingleSelectionGrid:
return "SingleSelectionGrid";
case String:
return "String";
case Table:
return "Table";
case TableDir:
return "TableDir";
case TableDirUU:
return "TableDirUU";
case TableUU:
return "TableUU";
case Text:
return "Text";
case TextLong:
return "TextLong";
case Time:
return "Time";
case TimestampWithTimeZone:
return "TimestampWithTimeZone";
case TimeZoneId:
return "TimeZoneId";
case URL:
return "URL";
case UUID:
return "UUID";
case YesNo:
return "YesNo";
}
IServiceReferenceHolder<IDisplayTypeFactory> cache = s_displayTypeFactoryCache.get(displayType);
if (cache != null) {

View File

@ -34,12 +34,14 @@ import org.compiere.model.MProcessPara;
import org.compiere.model.MSequence;
import org.compiere.model.MTable;
import org.compiere.model.MTree;
import org.compiere.model.PO;
import org.compiere.model.Query;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.AdempiereUserError;
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
import org.compiere.util.Trx;
import org.compiere.util.Util;
@org.adempiere.base.annotation.Process
@ -93,7 +95,7 @@ public class MigraID extends SvrProcess {
String msg = "";
if (! Util.isEmpty(p_UUID_From)) {
String uuidCol = MTable.getUUIDColumnName(tableName);
String uuidCol = PO.getUUIDColumnName(tableName);
if (Util.isEmpty(p_UUID_To)) {
p_UUID_To = UUID.randomUUID().toString();
}
@ -106,14 +108,22 @@ public class MigraID extends SvrProcess {
if (cnt <= 0) {
msg = "@Error@: UUID " + p_UUID_From + " not found on table " + tableName;
} else {
int id = -1;
msg = "UUID changed on table " + tableName + " from " + p_UUID_From + " to " + p_UUID_To;
StringBuilder sqlSB = new StringBuilder()
.append("SELECT ").append(tableName).append("_ID")
.append(" FROM ").append(tableName)
.append(" WHERE ").append(uuidCol).append("=?");
int id = DB.getSQLValueEx(get_TrxName(), sqlSB.toString(), p_UUID_To);
addBufferLog(id, null, null, msg, p_AD_Table_ID, id);
if (table.isIDKeyTable()) {
StringBuilder sqlSB = new StringBuilder()
.append("SELECT ").append(tableName).append("_ID")
.append(" FROM ").append(tableName)
.append(" WHERE ").append(uuidCol).append("=?");
id = DB.getSQLValueEx(get_TrxName(), sqlSB.toString(), p_UUID_To);
}
addBufferLog(0, null, null, msg, p_AD_Table_ID, id);
msg = "@OK@";
// migrateReferenceUU(tableName);
migrateChildren(tableName, false);
// migrateRecordUU();
// migrateAD_PreferenceUU(idCol);
// migrateTreesUU(tableName);
}
} else {
boolean seqCheck = false;
@ -130,42 +140,56 @@ public class MigraID extends SvrProcess {
}
}
// convert ID
int cnt = updID(tableName, idCol);
int cnt = updID(tableName, idCol, true);
if (cnt <= 0) {
msg = "@Error@: ID " + p_ID_From + " not found on table " + tableName;
} else {
msg = "ID changed on table " + tableName + " from " + p_ID_From + " to " + p_ID_To;
addBufferLog(p_ID_From, null, null, msg, p_AD_Table_ID, p_ID_To);
msg = "@OK@";
}
migrateReference(tableName);
migrateChildren(tableName);
migrateRecordID();
migrateAD_Preference(idCol);
migrateTrees(tableName);
if ("C_DocType_ID".equals(idCol)) {
// special preference C_DocTypeTarget_ID
migrateAD_Preference("C_DocTypeTarget_ID");
}
// TODO: implement migration for SingleSelectionGrid and MultipleSelectionGrid
migrateReference(tableName);
migrateChildren(tableName, true);
migrateRecordID();
migrateAD_Preference(idCol);
migrateTrees(tableName);
if ("C_DocType_ID".equals(idCol)) {
// special preference C_DocTypeTarget_ID
migrateAD_Preference("C_DocTypeTarget_ID");
}
// TODO: implement migration for SingleSelectionGrid and MultipleSelectionGrid
if (seqCheck) {
MSequence seq = MSequence.get(getCtx(), tableName, get_TrxName());
if (seq != null) {
seq.validateTableIDValue(get_TrxName()); // ignore output messages
if (seqCheck) {
MSequence seq = MSequence.get(getCtx(), tableName, get_TrxName());
if (seq != null) {
seq.validateTableIDValue(get_TrxName()); // ignore output messages
}
}
}
}
/* Force showing error in commit - for example when violating foreign keys */
Trx.get(get_TrxName(), false).commit(true);
return msg;
}
private int updID(String tableName, String idCol) {
/**
* Update key on table
* @param tableName - table
* @param idCol - id column
* @param idKey - true when migrating ID keys, false when migrating UUID keys
* @return count of records updated
*/
private int updID(String tableName, String idCol, boolean idKey) {
StringBuilder updIDSB = new StringBuilder()
.append("UPDATE ").append(tableName)
.append(" SET ").append(idCol).append("=?")
.append(" WHERE ").append(idCol).append("=?");
int cnt = DB.executeUpdateEx(updIDSB.toString(), new Object[] {p_ID_To, p_ID_From}, get_TrxName());
int cnt;
if (idKey)
cnt = DB.executeUpdateEx(updIDSB.toString(), new Object[] {p_ID_To, p_ID_From}, get_TrxName());
else
cnt = DB.executeUpdateEx(updIDSB.toString(), new Object[] {p_UUID_To, p_UUID_From}, get_TrxName());
return cnt;
}
@ -194,7 +218,7 @@ public class MigraID extends SvrProcess {
for (List<Object> row : rows) {
String tableRef = (String) row.get(0);
String columnRef = (String) row.get(1);
int cnt = updID(tableRef, columnRef);
int cnt = updID(tableRef, columnRef, true);
if (cnt > 0) {
String msg = cnt + " reference records updated in " + tableRef + "." + columnRef;
addBufferLog(p_ID_From, null, null, msg, 0, 0);
@ -205,7 +229,12 @@ public class MigraID extends SvrProcess {
}
private void migrateChildren(String tableName) {
/**
* Migrate foreign keys for tableName
* @param tableName - name of parent table to migrate children foreign keys
* @param idKey - true when migrating ID keys, false when migrating UUID keys
*/
private void migrateChildren(String tableName, boolean idKey) {
final String sqlFK = ""
+ "SELECT t.TableName, c.ColumnName "
+ "FROM AD_Table t, AD_Column c, AD_Reference r "
@ -213,10 +242,10 @@ public class MigraID extends SvrProcess {
+ " AND t.IsActive = 'Y' AND t.IsView = 'N' "
+ " AND c.IsActive = 'Y' AND c.ColumnSql IS NULL "
+ " AND c.AD_Reference_ID = r.AD_Reference_ID "
+ " AND ( c.AD_Reference_ID IN ( 19/*Table Direct*/ ) "
+ " OR ( c.AD_Reference_ID IN ( 30/*Search*/ ) "
+ " AND ( c.AD_Reference_ID=? "
+ " OR ( c.AD_Reference_ID=? "
+ " AND c.AD_Reference_Value_ID IS NULL ) ) "
+ " AND UPPER(c.ColumnName) = UPPER(? || '_ID') "
+ " AND UPPER(c.ColumnName) = UPPER(?) "
+ "UNION "
+ "SELECT t.TableName, c.ColumnName "
+ "FROM AD_Table t, AD_Column c, AD_Reference r, AD_Ref_Table rt, AD_Table tr "
@ -224,14 +253,29 @@ public class MigraID extends SvrProcess {
+ " AND t.IsActive = 'Y' AND t.IsView = 'N' "
+ " AND c.IsActive = 'Y' AND c.ColumnSql IS NULL "
+ " AND c.AD_Reference_ID = r.AD_Reference_ID "
+ " AND ( c.AD_Reference_ID IN ( 18/*Table*/ ) "
+ " OR ( c.AD_Reference_ID IN ( 30/*Search*/ ) "
+ " AND ( c.AD_Reference_ID=? "
+ " OR ( c.AD_Reference_ID=? "
+ " AND c.AD_Reference_Value_ID IS NOT NULL ) ) "
+ " AND c.AD_Reference_Value_ID = rt.AD_Reference_ID "
+ " AND rt.AD_Table_ID = tr.AD_Table_ID "
+ " AND UPPER(tr.TableName) = UPPER(?) "
+ "ORDER BY 1, 2";
List<List<Object>> rows = DB.getSQLArrayObjectsEx(get_TrxName(), sqlFK, tableName, tableName);
int tableDirRefId;
int searchRefId;
int tableRefId;
String foreignColName;
if (idKey) {
tableDirRefId = DisplayType.TableDir;
searchRefId = DisplayType.Search;
tableRefId = DisplayType.Table;
foreignColName = tableName + "_ID";
} else {
tableDirRefId = DisplayType.TableDirUU;
searchRefId = DisplayType.SearchUU;
tableRefId = DisplayType.TableUU;
foreignColName = PO.getUUIDColumnName(tableName);
}
List<List<Object>> rows = DB.getSQLArrayObjectsEx(get_TrxName(), sqlFK, tableDirRefId, searchRefId, foreignColName, tableRefId, searchRefId, tableName);
if (rows != null && rows.size() > 0) {
for (List<Object> row : rows) {
String tableRef = (String) row.get(0);
@ -240,7 +284,7 @@ public class MigraID extends SvrProcess {
if ("EntityType".equals(columnRef) || "AD_Language".equals(columnRef)) {
continue;
}
int cnt = updID(tableRef, columnRef);
int cnt = updID(tableRef, columnRef, idKey);
if (cnt > 0) {
String msg = cnt + " children records updated in " + tableRef + "." + columnRef;
addBufferLog(p_ID_From, null, null, msg, 0, 0);
@ -248,10 +292,10 @@ public class MigraID extends SvrProcess {
}
}
// Special case for C_BPartner.AD_OrgBP_ID defined as Button in dictionary
if ("AD_Org".equalsIgnoreCase(tableName)) {
if (idKey && "AD_Org".equalsIgnoreCase(tableName)) {
String tableRef = "C_BPartner";
String columnRef = "AD_OrgBP_ID";
int cnt = updID(tableRef, columnRef);
int cnt = updID(tableRef, columnRef, idKey);
if (cnt > 0) {
String msg = cnt + " children records updated in " + tableRef + "." + columnRef;
addBufferLog(p_ID_From, null, null, msg, 0, 0);

View File

@ -293,7 +293,7 @@ public abstract class AbstractADTabbox extends AbstractUIPart implements IADTabb
if (oldTabpanel.getRecord_ID() + zeroValid <= 0)
canJump = false;
// IDEMPIERE-651 Allow navigating to a detail when parent doesn't have ID
if (! canJump && Util.isEmpty(oldTabpanel.getGridTab().getKeyColumnName()))
if (! canJump && (Util.isEmpty(oldTabpanel.getGridTab().getKeyColumnName()) || oldTabpanel.getGridTab().getKeyColumnName().endsWith("_UU")))
canJump = true;
}
}

View File

@ -107,6 +107,7 @@ import org.compiere.model.MQuery;
import org.compiere.model.MRecentItem;
import org.compiere.model.MRole;
import org.compiere.model.MSysConfig;
import org.compiere.model.MTable;
import org.compiere.model.MUserPreference;
import org.compiere.model.MWindow;
import org.compiere.model.PO;
@ -509,17 +510,18 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
{
gridWindow.initTab(tabIndex);
//init parent tab by parent ids
int[] parentIds = DB.getIDsEx(null, "SELECT " + gTab.getLinkColumnName() + " FROM " + gTab.getTableName() + " WHERE " + query.getWhereClause());
if (parentIds.length > 0)
StringBuilder sql = new StringBuilder("SELECT ").append(gTab.getLinkColumnName()).append(" FROM ").append(gTab.getTableName()).append(" WHERE ").append(query.getWhereClause());
List<Object> parentIds = DB.getSQLValueObjectsEx(null, sql.toString());
if (parentIds.size() > 0)
{
GridTab parentTab = null;
Map<Integer, MQuery>queryMap = new TreeMap<Integer, MQuery>();
for (int parentId : parentIds)
for (Object parentId : parentIds)
{
Map<Integer, Object[]>parentMap = new TreeMap<Integer, Object[]>();
int index = tabIndex;
int oldpid = parentId;
Object oldpid = parentId;
GridTab currentTab = gTab;
while (index > 0)
{
@ -617,9 +619,10 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
//set target detail tab as active tab and navigate to target record
int count = table.getRowCount();
MTable tbl = MTable.get(ctx, table.getTableName());
for(int i = 0; i < count; i++)
{
int id = -1;
Object id = null;
if (zoomColumnIndex >= 0)
{
Object zoomValue = table.getValueAt(i, zoomColumnIndex);
@ -627,12 +630,19 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
{
id = ((Number)zoomValue).intValue();
}
else if (zoomValue != null && zoomValue instanceof String)
{
id = zoomValue.toString();
}
}
else
{
id = table.getKeyID(i);
if (tbl.isUUIDKeyTable())
id = table.getUUID(i);
else
id = table.getKeyID(i);
}
if (id == ((Integer)query.getZoomValue()).intValue())
if (id != null && id.equals(query.getZoomValue()))
{
setActiveTab(gridWindow.getTabIndex(gTab), null);
gTab.navigate(i);
@ -3294,8 +3304,11 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
if (toolbar.getEvent() != null)
{
int record_ID = adTabbox.getSelectedGridTab().getRecord_ID();
if (record_ID <= 0)
return;
if (record_ID <= 0) {
MTable table = MTable.get(adTabbox.getSelectedGridTab().getAD_Table_ID());
if (!table.isUUIDKeyTable())
return;
}
// Query
MQuery query = new MQuery();

View File

@ -211,6 +211,22 @@ public final class AEnv
zoom(AD_Window_ID, query);
} // zoom
/*************************************************************************
* Zoom to AD Window by AD_Table_ID and Record_UU.
* @param AD_Table_ID
* @param Record_UU
* @param query initial query for destination AD Window
* @param windowNo
*/
public static void zoomUU(int AD_Table_ID, String Record_UU, MQuery query, int windowNo)
{
int AD_Window_ID = Env.getZoomWindowUU(AD_Table_ID, Record_UU, windowNo);
// Nothing to Zoom to
if (AD_Window_ID == 0)
return;
zoom(AD_Window_ID, query);
} // zoom
/**
* Call {@link #zoom(int, int, MQuery, int)}
* @param AD_Table_ID
@ -460,13 +476,18 @@ public final class AEnv
zoomQuery.setZoomValue(value);
zoomQuery.addRestriction(column, MQuery.EQUAL, value);
zoomQuery.setRecordCount(1); // guess
if (value instanceof Integer && ((Integer) value).intValue() >= 0 && zoomQuery != null && zoomQuery.getZoomTableName() != null) {
int tableId = MTable.getTable_ID(zoomQuery.getZoomTableName());
zoom(tableId, ((Integer) value).intValue(), zoomQuery, lookup.getWindowNo());
} else {
if (zoomQuery.getZoomTableName() != null) {
int tableId = -1;
tableId = MTable.getTable_ID(zoomQuery.getZoomTableName());
if (value instanceof Integer && ((Integer) value).intValue() >= 0 && zoomQuery != null && zoomQuery.getZoomTableName() != null) {
zoom(tableId, ((Integer) value).intValue(), zoomQuery, lookup.getWindowNo());
} else {
zoomUU(tableId, value.toString(), zoomQuery, lookup.getWindowNo());
}
} else {
int windowId = lookup.getZoom(zoomQuery);
zoom(windowId, zoomQuery, lookup.getWindowNo());
}
}
}
/**

View File

@ -158,8 +158,9 @@ public class DefaultEditorFactory implements IEditorFactory {
}
/** Table Direct */
else if (displayType == DisplayType.TableDir ||
displayType == DisplayType.Table || displayType == DisplayType.List)
else if (displayType == DisplayType.TableDir || displayType == DisplayType.TableDirUU ||
displayType == DisplayType.Table || displayType == DisplayType.TableUU ||
displayType == DisplayType.List)
{
editor = new WTableDirEditor(gridField, tableEditor, editorConfiguration);
}
@ -174,7 +175,7 @@ public class DefaultEditorFactory implements IEditorFactory {
editor = new WUrlEditor(gridField, tableEditor, editorConfiguration);
}
else if (displayType == DisplayType.Search)
else if (displayType == DisplayType.Search || displayType == DisplayType.SearchUU)
{
editor = new WSearchEditor(gridField, tableEditor, editorConfiguration);
}

View File

@ -30,6 +30,7 @@ import org.adempiere.webui.editor.WEditor;
import org.adempiere.webui.factory.IEditorFactory;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.util.DisplayType;
import org.osgi.service.component.annotations.Component;
/**
@ -40,8 +41,6 @@ import org.osgi.service.component.annotations.Component;
property = {"service.ranking:Integer=1"})
public class SchedulerStateEditorFactory implements IEditorFactory {
private final static int SCHEDULER_STATE_AD_REFERENCE_ID = 200173;
/**
* default constructor
*/
@ -56,7 +55,7 @@ public class SchedulerStateEditorFactory implements IEditorFactory {
@Override
public WEditor getEditor(GridTab gridTab, GridField gridField, boolean tableEditor,
IEditorConfiguration editorConfiguration) {
if (gridField != null && gridField.getDisplayType() == SCHEDULER_STATE_AD_REFERENCE_ID) {
if (gridField != null && gridField.getDisplayType() == DisplayType.SchedulerState) {
return new SchedulerStateEditor(gridField, tableEditor, editorConfiguration);
}
return null;

View File

@ -350,8 +350,10 @@ public final class Dialog {
case DisplayType.Integer:
return new WNumberEditor(editorType);
case DisplayType.TableDir:
case DisplayType.TableDirUU:
return new WTableDirEditor(lookup, "", "", true, false, true);
case DisplayType.Search:
case DisplayType.SearchUU:
return new WSearchEditor(lookup, "", "", true, false, true);
case DisplayType.ChosenMultipleSelectionSearch:
return new WChosenboxSearchEditor(lookup, "", "", true, false, true);

View File

@ -379,9 +379,11 @@ public class FDialog
weditor = new WNumberEditor();
break;
case DisplayType.TableDir:
case DisplayType.TableDirUU:
weditor = new WTableDirEditor(lookup, "", "", true, false, true);
break;
case DisplayType.Search:
case DisplayType.SearchUU:
weditor = new WSearchEditor(lookup, "", "", true, false, true);
break;
case DisplayType.ChosenMultipleSelectionSearch:

View File

@ -100,6 +100,7 @@ import org.compiere.model.MSysConfig;
import org.compiere.model.MTab;
import org.compiere.model.MTable;
import org.compiere.model.MUserQuery;
import org.compiere.model.PO;
import org.compiere.model.Query;
import org.compiere.model.SystemIDs;
import org.compiere.util.AdempiereSystemError;
@ -2212,7 +2213,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
// Column
ListItem row = (ListItem)rowList.get(rowIndex);
Combobox table = (Combobox)row.getFellow("listTable"+row.getId());
String exists="";
StringBuilder exists = new StringBuilder();
boolean isExists = false;
boolean isExistCondition = false;
@ -2256,8 +2257,15 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
if (table.getSelectedItem() != null && !table.getSelectedItem().getValue().equals(m_AD_Tab_UU))
{
if (!isCompositeExists) {
exists ="SELECT 1 FROM "+m_gridTab.getTableName()+" WHERE "+m_gridTab.getTableName()+"."+m_gridTab.getLinkColumnName()+" = "+m_tableName+"."+m_tableName+"_ID ";// "+tab.getTableName()+".";
ColumnSQL = exists+" AND " + ColumnSQL;
MTable refTable = MTable.get(Env.getCtx(), m_tableName);
exists.append("SELECT 1 FROM ").append(m_gridTab.getTableName())
.append(" WHERE ").append(m_gridTab.getTableName()).append(".").append(m_gridTab.getLinkColumnName())
.append(" = ").append(m_tableName).append(".");
if (refTable.isUUIDKeyTable())
exists.append(PO.getUUIDColumnName(m_tableName));
else
exists.append(m_tableName).append("_ID ");
ColumnSQL = exists.toString() + " AND " + ColumnSQL;
}
isExists = true;

View File

@ -33,6 +33,7 @@ import java.util.Properties;
import org.compiere.model.MTestUU;
import org.compiere.model.PO;
import org.compiere.model.X_TestUUDet;
import org.compiere.util.Env;
import org.compiere.util.Util;
import org.idempiere.test.AbstractTestCase;
@ -46,6 +47,7 @@ import org.junit.jupiter.api.Test;
public class MTestUUTest extends AbstractTestCase {
private static final String TestRecordInGardenWorld = "8858ecc2-cf1d-405f-987f-793536037e76";
private static final String TestRecordInSystem = "4e148b89-bdd9-48a6-8a8a-7609092f965c";
public MTestUUTest() {
}
@ -86,4 +88,24 @@ public class MTestUUTest extends AbstractTestCase {
assertFalse(testuu2.get_UUID().equals(TestRecordInGardenWorld));
}
@Test
public void testInsertingTestUUDet() {
Properties ctx = Env.getCtx();
String trxName = getTrxName();
X_TestUUDet testuudet = new X_TestUUDet(ctx, PO.UUID_NEW_RECORD, trxName);
testuudet.setName("Test UU Det record created on JUnit test");
testuudet.setTestUU_UU(TestRecordInGardenWorld);
testuudet.setAltTestUU_UU(TestRecordInSystem);
assertTrue(testuudet.validForeignKeys());
testuudet.saveEx();
testuudet.load(trxName);
assertEquals("Test UU Det record created on JUnit test", testuudet.getName());
String uukey = testuudet.getTestUUDet_UU();
String uuid = testuudet.get_UUID();
assertTrue(Util.isUUID(uukey));
assertEquals(uukey, uuid);
assertEquals(testuudet.getAltTestUU_UU(), TestRecordInSystem);
assertEquals(testuudet.getTestUU_UU(), TestRecordInGardenWorld);
}
}