OnePlaceMail API: set the destinationlocation to a documentset
Hello,
I made a custom plugin to select a document set in which the email should be placed but when trying to set the url of this documentset I receive the message that the location does not contain content types. When i select the documentset in the oneplacemail tree it does however show content types.
I use the followinig code to set the url:
BeforeFilingWindowLoadContext eventContext = ( BeforeFilingWindowLoadContext)context;
eventContext.DestinationLocation = new OPMSharePointLocation(eventContext.DestinationLocation.AbsoluteLibraryUrl, Form.FolderName);
where the form.foldername is a absolute url of the document set in which the document should be stored.
Any ideas on why this wont work?
-
Cameron Dwyer commented
Hi Dennis,
Thanks for updating the post and I'm glad you were able to get past your issue.
-
dennis . commented
Hi Cameron,
Thanks for the example plugin. It allowed me to properly debug my plugin. I eventually found out i was doing something stupid on formclosing. So i was able to fix my plugin.
Thank you for the quick help.
-
dennis . commented
Hi Cameron,
Thanks for the quick response. I will try the above and will let you know the outcome.
-
Cameron Dwyer commented
Hi Dennis,
The code you have supplied looks fine, I would check the actual URLs coming through in the AbsoluteLibraryUrl and Form.FolderName URL and ensure that Form.FolderName starts with AbsoluteLibraryUrl.
I have tested with R6.4.2 of OnePlaceMail (the latest version) against SharePoint 2013. I was able to set the default location to a document set within a library and also a subfolder within a document set in a library without error and with the correct list of Content Types available.
This is the code I used to set to a document set called "colindocset1" in a library:
BeforeFilingWindowLoadContext eventContext = (BeforeFilingWindowLoadContext)context;
eventContext.DestinationLocation = new OPMSharePointLocation(" http://vs-server38/DocSetLib" rel="nofollow">http://vs-server38/DocSetLib", "http://vs-server38/DocSetLib", "