[Resolvido] Criar nova aba Na janela BPartner


#1

Bom dia.
Alterei a tabela C_BPARTNER para conter um novo campo “ispatient”.
Adicionei este campo nas colunas da tabela e mandei sincronizar a tabela com o banco.

Adcionei nova aba na janela, e adcionei este campo.
Porem quando vou salvar o parceiro de negócio aparece uma msg dizendo “Not Saved” e sem erros na tela de prefêrencias.
Qual seria o procedimento correto?

Gerei inclusive um um customization.jar contendo a classe X_C_Bpartner.java gerada pelo GenerationModel.
Mas acontece o mesmo problema.

Veja só o arquivo gerado pelo log migration:

-- 20/05/2010 7h58min9s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,2000002,0,'ispatient',TO_TIMESTAMP('2010-05-20 07:58:09','YYYY-MM-DD HH24:MI:SS'),100,'U','Y','ispatient','ispatient',TO_TIMESTAMP('2010-05-20 07:58:09','YYYY-MM-DD HH24:MI:SS'),100)
;

-- 20/05/2010 7h58min9s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=2000002 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
;

-- 20/05/2010 7h58min50s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,2000022,2000002,0,20,291,'ispatient',TO_TIMESTAMP('2010-05-20 07:58:50','YYYY-MM-DD HH24:MI:SS'),100,'U',1,'Y','Y','N','N','N','N','N','N','N','N','N','N','Y','ispatient',0,TO_TIMESTAMP('2010-05-20 07:58:50','YYYY-MM-DD HH24:MI:SS'),100,0)
;

-- 20/05/2010 7h58min50s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=2000022 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;

-- 20/05/2010 7h58min55s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE C_BPartner ADD COLUMN ispatient CHAR(1) DEFAULT NULL CHECK (ispatient IN ('Y','N'))
;

-- 20/05/2010 7h59min37s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,Description,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,2000001,291,123,TO_TIMESTAMP('2010-05-20 07:59:37','YYYY-MM-DD HH24:MI:SS'),100,'Patient','U','N','N','Y','N','N','N','N','Y','N','N','Patient','N',130,0,TO_TIMESTAMP('2010-05-20 07:59:37','YYYY-MM-DD HH24:MI:SS'),100)
;

-- 20/05/2010 7h59min37s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=2000001 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID)
;

-- 20/05/2010 8h0min1s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,2000022,2000008,0,2000001,TO_TIMESTAMP('2010-05-20 08:00:00','YYYY-MM-DD HH24:MI:SS'),100,0,'U','Y','Y','Y','N','N','N','N','N','ispatient',10,0,TO_TIMESTAMP('2010-05-20 08:00:00','YYYY-MM-DD HH24:MI:SS'),100)
;

-- 20/05/2010 8h0min1s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=2000008 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
;

Deve estar faltando algum procedimento:
Estou usando para testes o release 3.5.4a em inglês.Apenas alterei a tabela de sequence:

UPDATE ADEMPIERE.AD_SEQUENCE SET CurrentNext = 2000000 WHERE CurrentNext < 2000000 AND IsTableID='Y';

#2

Ta um pouco confuso seu script.

Você adicionou um campo na AD_Element - 2000002
Você inclui este campo na C_BPartner - 291
Clicou no Sincronizar coluna e adicionou ele na Tabela pelo BD

Até aqui OK

É realmente necessário inserir uma nova aba apenas com um campo nela?
Você pode ao invés de inserir a Aba, colocar o campo diretamente na aba Business Partner.

Se for realmente necessário separar, inclua os campos: AD_Client_ID, AD_Org_ID, IsActive, C_BParnter_ID na Aba nova.

Att.


#3

Eu adicionei o um elemento e o campo a tabela C_BPartner.
Sincronizei este campo com o banco. E o próprio sistema alterou a base de dados.
Não executei nenhum comando no banco para tratar este campo. Apenas fiz um update na sequence na janela “SQL process”.
Após isso adcinei o a aba na janela e o campo.

Adicionei apenas este campo para testes. Após finalizar os levantamentos de pré requisitos terei mais campos nesta aba.
algo em torno de 5 ou 6, então achei melhor criar apenas outra aba.
Tb pq pretendo ocultar as outras, e deixar esta e a primeira aba(Business Partiner) visível.Se for possível.
Não sabia da obrigatoriedade dos demais campos:
Será que existe uma documentação? encontrei apenas de criação de janelas mas não encontrei referencia sobre abas com a mesma tabela.

Mas ainda esta acontecendo erros:
Agora mudou.
Ao alterar um BP existente, clicando apenas o campo que adcionei na nova aba,e no salvar.
Aparece esta msg:

Could not Sabe changes - data was changed after query.

System will re-query record.
ispatient=false(java.lang.Bollean) != DB:null -> New:(java.lang.Bollean)

Parece que ha uma diferença entre o banco e a aplicação.
Muito estranho.
Criei esta compo como “YES/NO” no AD.
E no banco como char(1);

Alguma idéia?


#4

Todo campo do tipo Yes/No deve ser obrigatório e o campo lógica padrão deve ser preenchido.

Vá no cadastro desta coluna, marque como obrigatório, coloque N (ou Y se preferir) na lógica padrão e clique em sincronizar coluna.

Atte.


#5

Valeu Ricardo.
Funcionou.
Mas matei o que tinha feito, alterando o campo deu erro no banco.
Inicialmente eu havia criado o campo como obrigatório.Havia esquecido de setar um valor default. putz.
Agora ficou certo:

-- 20/05/2010 14h32min35s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,2000000,0,'isPatient',TO_DATE('2010-05-20 14:32:35','YYYY-MM-DD HH24:MI:SS'),100,'U','Y','isPatient','isPatient',TO_DATE('2010-05-20 14:32:35','YYYY-MM-DD HH24:MI:SS'),100)
;

-- 20/05/2010 14h32min35s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=2000000 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
;

-- 20/05/2010 14h33min5s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,2000000,2000000,0,20,291,'isPatient',TO_DATE('2010-05-20 14:33:05','YYYY-MM-DD HH24:MI:SS'),100,'N','U',1,'Y','Y','N','N','N','N','N','Y','N','N','N','N','Y','isPatient',0,TO_DATE('2010-05-20 14:33:05','YYYY-MM-DD HH24:MI:SS'),100,0)
;

-- 20/05/2010 14h33min5s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=2000000 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;

-- 20/05/2010 14h33min8s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE C_BPartner ADD isPatient CHAR(1) DEFAULT 'N' CHECK (isPatient IN ('Y','N')) NOT NULL
;

-- 20/05/2010 14h33min57s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,2000000,291,123,TO_DATE('2010-05-20 14:33:57','YYYY-MM-DD HH24:MI:SS'),100,'U','N','N','Y','N','N','N','N','Y','N','N','Patient','N',130,0,TO_DATE('2010-05-20 14:33:57','YYYY-MM-DD HH24:MI:SS'),100)
;

-- 20/05/2010 14h33min57s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=2000000 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID)
;

-- 20/05/2010 14h34min22s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,2894,2000000,0,2000000,TO_DATE('2010-05-20 14:34:22','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',0,'U','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','Y','N','Client',10,0,TO_DATE('2010-05-20 14:34:22','YYYY-MM-DD HH24:MI:SS'),100)
;

-- 20/05/2010 14h34min22s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=2000000 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
;

-- 20/05/2010 14h34min40s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,2895,2000001,0,2000000,TO_DATE('2010-05-20 14:34:40','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',0,'U','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','Y','N','Organization',20,0,TO_DATE('2010-05-20 14:34:40','YYYY-MM-DD HH24:MI:SS'),100)
;

-- 20/05/2010 14h34min40s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=2000001 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
;

-- 20/05/2010 14h34min58s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,2896,2000002,0,2000000,TO_DATE('2010-05-20 14:34:58','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',0,'U','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.','Y','Y','Y','N','N','N','Y','N','Active',30,0,TO_DATE('2010-05-20 14:34:58','YYYY-MM-DD HH24:MI:SS'),100)
;

-- 20/05/2010 14h34min58s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=2000002 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
;

-- 20/05/2010 14h35min56s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,2893,2000003,0,2000000,TO_DATE('2010-05-20 14:35:56','YYYY-MM-DD HH24:MI:SS'),100,'Identifies a Business Partner',0,'U','A Business Partner is anyone with whom you transact.  This can include Vendor, Customer, Employee or Salesperson','Y','Y','Y','N','N','N','N','N','Business Partner ',40,0,TO_DATE('2010-05-20 14:35:56','YYYY-MM-DD HH24:MI:SS'),100)
;

-- 20/05/2010 14h35min56s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=2000003 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
;

-- 20/05/2010 14h36min0s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2010-05-20 14:36:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2000003
;

-- 20/05/2010 14h36min19s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,2000000,2000004,0,2000000,TO_DATE('2010-05-20 14:36:19','YYYY-MM-DD HH24:MI:SS'),100,0,'U','Y','Y','Y','N','N','N','N','N','isPatient',50,0,TO_DATE('2010-05-20 14:36:19','YYYY-MM-DD HH24:MI:SS'),100)
;

-- 20/05/2010 14h36min19s GMT-03:00
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=2000004 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
;

Muito obrigado mesmo