App_Code\CMSModules\SharePoint

Srikanth Sharma asked on July 27, 2017 02:01

While migrating to version 10, we observe that SharePoint folder under \App_Code\CMSModules\ is deleted. We've several transformation referring the SharePoint Module.

Please let us know the substitute for below SharePoint functions:

SharePointFunctions.SplitSharePointField(EvalHTML("ows_Created Date"),1) SharePointFunctions.SplitSharePointField(EvalHTML("ows_FileRef"),1) SharePointFunctions.GetSharePointFileUrl("server_name", SharePointFunctions.SplitSharePointField(EvalHTML("ows_FileRef"),1)) SharePointFunctions.SplitSharePointField(EvalHTML("ows_FileRef"),1))

Correct Answer

Mike Wills answered on July 27, 2017 02:21

It looks like the upgraded transformations should use the GetSharePointFileUrl method in the TransformationHelper class. To replace the SplitSharePointField function, the transformation can simply use a String.Split. Here's an example from an out-of-the-box transformation.

<%-- The Author is a lookup field containing ID and value separated by semicolon --%>
Author: <%# Eval("Author").ToString().Split(new[]{';'})[1] %><br />
1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.