On April 27, 2024, our Sign-in and Create Account options will be unavailable from 9am-12pm ET. During this maintenance window, developer account access and free trial registration will be unavailable.

Mapping properties question

Hi I'm trying to map the properties from a Sharepoint document to the document I'm about to archive. I'm following the LinkFile example in the SDK.

I have successfully archived the document, and I have successfully set the technical properties.

However, I'm now trying to map the other properties.

IContentTypePropertyMapper pMapper = ContentTypePropertyMapperFactory.Create("LinkFileExample", configurationProvider, livelinkConnection);

IList<LivelinkCategoryVersion> listProps= pMapper.MapProperties(originalFile.Item);

I'm not seeing any result in listProps (count=0)

Then I tried using 

SPContentType contentType=originalFile.Item.ContentType.Parent; //The parent content type id matches the xml file

ICategoryMappingFinder mapFindings = CategoryMappingFinderFactory.Create("LinkFileExample", configurationProvider, livelinkConnection);
CategoryMappingFinderResult res= mapFindings.FindCategoryMapping(contentType);

But res.categorymapping = null and res.contenttype = null

 

This method works, but I was hoping to map the properties using a less hardcoded approach.

LivelinkCategory publishedCategory = livelinkService.GetLivelinkCategory(65577, -2005);
LivelinkCategoryVersion publishedCategoryVersion = publishedCategory.LastVersion;
publishedCategoryVersion.Values["Status"] = "Published";

 

 

What is the correct approach?

Thanks

Stian