SharePoint Online integration

Mar 21, 2012 at 6:24 PM

Hello

I just tried to upload this solution to our SharePoint Online website (at /_catalogs/solutions/). When I try to activate the solution, I receive the following error message (partially in German, sorry):

Fehler

Diese Lösung enthält ungültiges Markup oder Elemente, die nicht als Teil einer Sandkastenlösung bereitgestellt werden können. Überprüfungsfehler der Lösungsmanifestdatei für die Lösung '8a95d46b-2477-475a-a677-40d82a3a48f6', Datei 'manifest.xml', Zeile 2, Zeichen '4'.: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, Assemblies, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'.

 

Führen Sie die Problembehandlung mit Microsoft SharePoint Foundation aus.

Korrelations-ID: 94df836e-ddc2-4964-b6ef-718ad314050e

Datum und Uhrzeit: 21.03.2012 10:20:21

 

Anybody any idea how I can get this working?

Best,
Mischa 

 

Jun 8, 2012 at 7:29 AM

This feature is provided as a farm solution but deployed as a sandboxed solution in SharePoint Online. Sandboxed solutions are uploaded and activated in the site collection but must not contain particular items, apparently for example the 'TemplateFiles' element.

Jun 19, 2012 at 9:04 AM

Dear "Communardo"

Many thanks for your answer. Anyway, I still do not understand if and how I can use your little tool in a SharePoint Online environment. 

Maybe you can give me some advice how I can remove the particular item that is not allowed.

Best,

Mischa Szeker

Jun 21, 2012 at 7:37 AM

Hello Mischa,

The current solution contains particular items (javascript files in Layouts folder) that are not allowed for sandboxed solutions. That’s why it is necessary to develop a new solution which fulfills the requirements for sandboxed solutions. Therefore the current solution has to be changed as follows:

  • To eliminate the problem regarding not allowed items in sandboxes solutions:
  1. Move all javascript files from layouts folder to a separate module and then remove layouts folder from solution
  2. Integrate the javascripts module in the CustomAction tag (in elements.xml file) as follows:
    <CustomAction Sequence="100" ScriptBlock="document.write('&lt;script type=&quot;text/javascript&quot; src=&quot;~site/JavaScriptModule/ClientObjectModelUtility4.js&quot;;&gt;&lt;/' + 'script&gt;');" Location="ScriptLink"/>
    <CustomAction Sequence="101" ScriptBlock="document.write('&lt;script type=&quot;text/javascript&quot; src=&quot;~site/JavaScriptModule/SendDocument4.js&quot;;&gt;&lt;/' + 'script&gt;');" Location="ScriptLink"/>
  3. In project properties the setting „Include Assembly in Package“ has to be set to "false".  
  • To enable cross domain authentication:
  1. Implement a custom function “ExportHailStormCustom” based on function “ExportHailStorm” (…) from INIT.JS (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1031\INIT.JS)
  2. Modify the function getOutlook as follows: insert a line of code just above the line “modalDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose("Send e-mail", "Please, wait...", 300, 400);” which uses ExportHailStormCustom to establishes the connection to Outlook.

The part regarding the cross domain authentication is a possible solution but maybe a bit problematically regarding usability because if a client wants to send a document from SharePoint a popup is displayed and you are required to input your Exchange credentials. But hopefully this isn’t necessary each time rather than one time for good and all in Outlook.

Jul 30, 2014 at 7:57 AM
Hi,

I am creating sharepoint hosted app and using your code in my app.js file. It is working fine in Sharepoint on premises.
However in Sharepoint Online, I am getting "you don't have permission to perform this operation" at following line of code :-
otem.Attachments.Add(fullUrlForSingleDoc);

Please help.
Jul 30, 2014 at 10:37 AM
Hi,
I got the solution. its just about simply adding BCS permission in AppManifest.xml file.
Marked as answer by Communardo on 10/7/2014 at 11:17 PM