Skip to main content


 

Symptoms


Also noticed on a play server that not all SharePoint fields/columns e.g ID of the user who has the set the protection tag,
record etc are shown in SMO when K2 for SharePoint is integrated with 4.7
 

Diagnoses


We provided the scripts as per the KB article http://help.k2.com/kb001780.

Please note this is on the 4.6.11

Please see script below:

Run this script on the SQL server where the K2 database has been installed:

IF OBJECT_ID ('tempdb..#TempSharePointObjectInclusion') IS NOT NULL DROP TABLE #TempSharePointObjectInclusion
CREATE TABLE #TempSharePointObjectInclusion
(
/PropertyName] ]nvarchar](50) NOT NULL,
/Value] ]nvarchar](1024) NOT NULL,
/Included] ]bit] NOT NULL,
/SharePointObjectInclusionTypeID] ]int] NOT NULL,
/SharePointObjectInclusionVersionID] ]int] NOT NULL
)

INSERT INTO #TempSharePointObjectInclusion
VALUES
('InternalName', '_ComplianceFlags',0,2,2),
('InternalName', '_ComplianceTag',0,2,2),
('InternalName', '_ComplianceTagWrittenTime',0,2,2),
('InternalName', '_ComplianceTagUserId',0,2,2),
('InternalName', '_IsRecord',0,2,2)

BEGIN TRAN
MERGE EIntegration].]SharePointObjectInclusion] AS tgt
USING #TempSharePointObjectInclusion AS src
ON tgt.PropertyName = src.PropertyName AND tgt.tValue] = src.cValue]
WHEN NOT MATCHED BY TARGET THEN
INSERT ( PropertyName], ,Value], ,Included], ,SharePointObjectInclusionTypeID], ,SharePointObjectInclusionVersionID])
VALUES (src.cPropertyName], src.cValue], src.cIncluded], src.cSharePointObjectInclusionTypeID], src.cSharePointObjectInclusionVersionID])

COMMIT

After this script has been executed
Use the output data from the Identification script to identify affected libraries.

Identification Script:

WITH SmartObjectLatest

AS (

SELECT SO1.SmartObjectXML

,SO1.SystemName

FROM MSmartBroker].]SmartObject] AS SO1

LEFT JOIN SmartObject AS SO2

ON SO1.SmartObjectGUID = SO2.SmartObjectGUID

AND (SO2.version > SO1.version)

WHERE SO2.SmartObjectGUID IS NULL

)

SELECT DISTINCT TSystemName]

FROM SmartObjectLatest

CROSS APPLY SmartObjectXML.nodes('/smartobjectroot/methods/method/serviceinstances/serviceinstance/objects/object/properties/property') ServiceObject(Property)

WHERE ServiceObject.Property.value('@name', 'varchar(25)') = '_ComplianceTagWrittenTime'

OR ServiceObject.Property.value('@name', 'varchar(25)') = '_ComplianceTag'


 

Resolution


Issue resolved using the steps below:

1. Note down the current GUID for the SO associated with he List/Doc Lib
2. Delete the SO via the DocLib
3. Re-run registration wizard.
4. Appify the DocLib again
4. SO was created with no errors.
5. They then need to export that SO via the tester, change the GUID and import it back




 
Be the first to reply!

Reply