Skip to main content


 

Symptoms

 


Assume the following scenario. You are using SharePoint 2013 list exposed via SP Content Broker. Number of new columns were added into it and respective service instance in source environment was refreshed and everything works fine. Next this SmatObject is deployed into another environment and once package is deployed SmO related with the list is being shown with red cross icon on it in Tester Tool and attempts to execute list method via tester tool shows the following error message:

Inconsistent SmartObject. Mapped Service Object property does not exist.

Source: SourceCode.HostServerLib

In case you delete service instance in Tester Tool and manually re-create it in destination environment it works fine. But as soon as package from source environment which contains this service instance deployed it reverts to aforementioned error state.

At a first glance SharePoint lists in source and destination environments are identical.
 

 

Diagnoses

 


First you have to confirm that number of columns and display names of the columns are match between source and destination environment if this is the case but you getting aforementioned error it means that your lists are not identical and internal columns names different between the lists. SharePoint content broker uses internal column names to work with columns.
In such scenario it is possible to see in error that property name does not match display name but it is normally recognizable enough to know which column has an issue.
K2 SharePoint content broker uses column static/internal names which are not exposed anywhere in SharePoint GUI and can only be seen in column URL. In order to check internal/static name you can go to List Settings, and then click on the column name in which you are interested. On the Change Column page, the URL will end in something like:

/_layouts/FldEdit.aspx?List={37920121-19B2-4C77-92FF-8B3E07853114}andField=Product_x0020_Description

Part of the url in the very end after "=" sign is your internal/static name.

More details on SharePoint internal/static column names: When you create a column on a list, both its DisplayName and StaticName are set to the same value. However, the StaticName may contain converted values for some characters (e.g. space, hyphen), most notably a space ‘ ‘ is converted to ‘x0020’. So if the DisplayName is ‘Product Description’, then the StaticName will be ‘Product_x0020_Description’.
Next the StaticName is limited to 32 characters including the translations for special characters. Because of this you may have something like:
"Contract_x0020_x002d_x0020_Pla"
In order to have nice and readable names for your columns it is recommended to create them without spaces/hyphens or in cases when it is necessary to have them in display name create without them first to get readable static name, and change display name afterwards.

Internal column name set when column is created and stays fixed irrespectively of any subsequent display name changes for this column.

 

 

 

Apart from mismatch of internal column names you could also can receive similar error because of missing list properties which are a bit difficult to notice. For example you may see this issue if your list was created in different version of SharePoint than one you have in destination environment (e.g. 2010 and 2013). To verify this part you can either access list of properties by accessing list specific URL, e.g:

 

 

 

https://portal.denallix.com/_api/web/lists/GetByTitle('ListName')/Fields

 

 

 

Or, alternatively with use of the following PowerShell script:

 

 

 

/system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")

 

$site= New-Object Microsoft.SharePoint.SPSite ("enter site url here")

 

$web=$site.OpenWeb()

 

$list=$web.Lists:"enter site list name here"]

 

$list.Fields |select title, internalname|sort title| more

 

$web.Dispose()

 

 

 

Resolution

This issue is caused by internal column names mismatch between source and destination environments. There are no options for changing internal column names in SharePoint and the only supported way to change internal name for column is to recreate column. Not officially supported by Microsoft way of changing internal column name which not requires recreating column is to change it with SharePoint Manager (https://spm.codeplex.com). This is not officially supported approach but it was tried by number of clients with positive results.

To avoid this or any other potential issue you have to make sure that your SharePoint lists are identical as stipulated in K2 documentation:
"SharePoint Lists and Libraries should be identical on the target environment to enable successful synchronization. SmartObjects do not have to exist on the target environment in order to be created. But the SharePoint List or Library and the columns within that List or Library must be the same and have the same data types as the source SharePoint List or Library in order to be imported " (source)

 

 



 
Be the first to reply!

Reply