Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

How to correctly provision a custom ListTemplate based upon a Document Library that results in a list that is email enabled.

$
0
0

Hi,

I need to provision using CAML a custom ListTemplate that creates a Document Library. That is straightforward. The issue is that such a resulting library does not have, under Library Settings, Communications, "Incoming email settings" available. There is a plethora of articles available that discuss this issue.

But  I think that having read this link I think the last question Richard poses here is absolutely key, (even though the Connect to Outlook issue there is a different issue).  

I have created a custom list template (for a Document Library) and associated schema.xml file based upon Create Custom List Templates in CAML by Karine Bosch. In that excellent article Karine states "Change also the value of the  Type attribute. Custom list templates must have at least number 10000. When I create a custom document library template, I start by 101 and then add a sequence number like 00, 01, 02, etc."

However, when a user then creates from the UI a list based on my custom template, it is not "Incoming email settings" enabled". I believe this is because if you look in SharePoint Manager at an out of the box document library you will see that both the BaseType and BaseTemplate properties are set to "Document Library". However, for the document library created from my custom template the BaseTemplate is empty and the BaseType is "Document Library". I believe this is why the custom document library is not showing the "Incoming email settings". And the CanReceiveEmail property of the list is set to False rather than True.

In Karine's article someone actually posts the following comment (to which there is no reply)

"Regarding where you say “Change also the value of the  Type attribute,” I believe it is not required and even not wise to change the type here. Some action items depend on the ServerTemplate/type, e.g. the “Connect to Outlook” depends on your list being of type 105 or some other base type. If your list template is not 105, e.g. for contacts, you will not see this action item. ...So is it not advisable to set your type in your ListTemplate to one of the base types, e.g. 101, 105, etc.?"

So some key questions.

  1. What is the correct (accepted) way to create a custom list template based upon a Document Library that shows the "Incoming email settings"?
  2. Are there any negative implications if one sets the Type attribute in the custom ListTemplate element to101 (Document Library) rather than a number over 10000? I have done this and it does then result in "Incoming email settings" being fully available.

Thanks.


Maz



Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>