UPDATE TBDD_MODULES SET PRODUCT_VERSION = '2.4.6.7' where NAME = 'Record-Organizer' 
GO

Change Trigger Suche nach VWPMO_WD_DOC_SEARCH und ersetze select
select DocID from VWPMO_DOC_SEARCH T, TBPMO_DOC_RECORD_LINK TRL where T.DocID = TRL.DOC_ID AND 
				TRL.RECORD_ID = @RECORD_ID
/* FULLTEXT SQL ERSETZEN*/
SELECT DISTINCT [dwDocID]
  FROM [dbo].FullText WHERE CONTAINS([Text], '"*@FULLTEXT*"')
  --OR FREETEXT ([Text], '@FULLTEXT')  


ALTER VIEW [dbo].[VWPMO_WD_OBJECT_RIGHTS]
AS
SELECT DISTINCT       
	AR.dwObjectID
	,AR.dwUserOrGroupID
	,AR.dwAccessRight
	,AR.dwObjectDBID
FROM
	[172.24.12.41\BRAINPOOL].windream60.dbo.AccessRight AS AR 
	INNER JOIN TBDD_USER T ON AR.dwUserOrGroupID = T.USERID_FK_INT_ECM
	INNER JOIN TBPMO_DOC_RECORD_LINK RL ON AR.dwObjectID = RL.DOC_ID
WHERE T.USERID_FK_INT_ECM <> 0 --ORDER BY dwObjectID
GO
CREATE NONCLUSTERED INDEX [IDX_TBPMO_CONTROL_VALUE_RECID_VALUE]
ON [dbo].[TBPMO_CONTROL_VALUE] ([RECORD_ID])
INCLUDE ([VALUE])
GO
DROP TABLE TBPMO_APPOINTMENT_CONTROLS
CREATE TABLE TBPMO_APPOINTMENT_CONTROLS(
	CONTROL_ID		INT					NOT NULL,
	APPT_SUBJECT	VARCHAR(100)		DEFAULT 'NO APPONTMENT-SUBJECT DEFINED',
	APPT_LOCATION	VARCHAR(100)		DEFAULT '',
	APPT_DESCRIPTION	VARCHAR(100)		DEFAULT '',
	ADDED_WHEN		DATETIME			DEFAULT GETDATE(),
CONSTRAINT 	   	[PK_TBPMO_APPOINTMENT_CONTROLS] 	PRIMARY KEY(CONTROL_ID))
GO

 ALTER TABLE TBPMO_CONTROL
 ADD SELECT_ONLY BIT NOT NULL DEFAULT 0
 GO
 ALTER VIEW [dbo].[VWPMO_CONTROL_SCREEN] AS
SELECT TOP 100 PERCENT
	T.GUID			CONTROL_ID,
	T.FORM_ID		CONTROL_ENTITY_ID,
	T.NAME			CONTROL_NAME,
	T.REQUIRED		CONTROL_REQUIRED,
	T.DEFAULT_VALUE	CONTROL_DEF_VALUE,
	T.READ_ONLY		CONTROL_READ_ONLY,
	T.SELECT_ONLY	CONTROL_SELECT_ONLY,
	T.MULTILINE		CONTROL_MULTILINE,
	T.PARENT_CONTROL_ID	CONTROL_PARENT_ID,
	T.COL_NAME		CONTROL_COL_NAME,
	T.SHOW_COLUMN   CONTROL_SHOW_COLUMN,
	T.CONNECTION_ID_1	CONTROL_CONNID_1,
	T.SQL_COMMAND_1		CONTROL_SQLCOMMAND_1,
	T.SQL_COMMAND_2		CONTROL_SQLCOMMAND_2,
	T.VISIBLE		CONTROL_VISIBLE,
	T.TREE_VIEW		CONTROL_TREE_VIEW,
	T.STATIC_LIST	CONTROL_STATIC_LIST,
	T4.GUID			CTRLTYPE_ID,
	T4.TYPE_NAME	CTRLTYPE_NAME,
	T.FORMAT_TYPE	CONTROL_FORMAT_TYPE,
	T.FORM_ID,
	T3.NAME			FORM_NAME,
	T3.LEVEL		FORM_LEVEL,
	T1.SCREEN_ID	SCREEN_ID,
	T2.NAME			SCREEN_NAME,
	T1.GUID			CTRLSCR_ID,
	T1.CONTROL_TEXT	CTRLSCR_CAPTION,
	T1.X_LOC		CTRLSCR_X_LOC,
	T1.Y_LOC		CTRLSCR_Y_LOC,
	T1.HEIGHT		CTRLSCR_HEIGHT,
	T1.WIDTH		CTRLSCR_WIDTH,
	T1.FONT_FAMILY	CTRLSCR_FONT_FAMILY,
	T1.FONT_COLOR	CTRLSCR_FONT_COLOR,
	T1.FONT_SIZE	CTRLSCR_FONT_SIZE,
	T1.FONT_STYLE	CTRLSCR_FONT_STYLE,
	T1.TAB_INDEX	CTRLSCR_TAB_INDEX,
	T1.TAB_STOP		CTRLSCR_TAB_STOP,
	T1.BACK_COLOR   CTRLSCR_BACK_COLOR,
	T.MASTER_DATA_ID CTRLSCR_MASTER_DATA_ID
FROM
	TBPMO_CONTROL T,
	TBPMO_CONTROL_SCREEN T1,
	TBPMO_SCREEN T2,
	TBPMO_FORM T3,
	TBPMO_CONTROL_TYPE T4
WHERE
	T.FORM_ID = T3.GUID AND
	T.GUID = T1.CONTROL_ID AND
	T1.SCREEN_ID = T2.GUID AND
	T.CONTROL_TYPE_ID = T4.GUID
ORDER BY 
	T1.SCREEN_ID,
	T.FORM_ID,
	T1.TAB_STOP
GO








