Creating SharePoint Custom List using a list using a Microsoft.SharePoint.Client.ClientContext object: Lists.Add method from existing Template does not Include Template Content (include content was checked for template)
The code below works assuming you have a list template setup called "GenTasksTemplate".
The problem is that even though the check box to include content was checked during the creation of the template, the task items in the new list do not get populated. What am I missing?
using System;
using System.Linq;
using Microsoft.SharePoint.Client;
protected void createSPlist(object sender, EventArgs e)
ClientContext context = new ClientContext("https://sharepointServer/sites/devcollection/");
var web = context.Web;
ListTemplateCollection ltc = context.Site.GetCustomListTemplates(context.Web);
ListCollection siteListsColection = web.Lists;
context.Load(ltc);
context.ExecuteQuery();
ListCreationInformation listCreationInfo = new ListCreationInformation
Title = "New Task from Template",
Description = "Tasks created from custom template"
Microsoft.SharePoint.Client.ListTemplate listTemplate = ltc.First(listTemp => listTemp.Name == "GenTasksTemplate");
listCreationInfo.TemplateFeatureId = listTemplate.FeatureId;
listCreationInfo.TemplateType = listTemplate.ListTemplateTypeKind;
listCreationInfo.DocumentTemplateType = listTemplate.ListTemplateTypeKind;
//listCreationInfo.CustomSchemaXml =
siteListsColection.Add(listCreationInfo);
context.Load(siteListsColection);
context.ExecuteQuery();
http://www.net4geeks.com Who said I was a geek?
Yes. I can create a list with the template using the UI. I can also create list programmatically using the Microsoft.SharePoint library within a Windows Forms Application. If I do create a provider-hosted app referencing Microsoft.SharePoint,
it results in a 64bit / 32bit mismatch error. I am running SharePoint 2013 on a 64 bit Windows 2012 Server.
The problem is that with a provider-hosted SharePoint App, I am limited to only using the Microsoft.SharePoint.Client library which is very limited.
http://www.net4geeks.com Who said I was a geek?
Similar Messages
-
Current platform : Linux
Current firefox version : Firefox 4 beta 12
Issue : does not update to RC 1 using the check for update feature.
Background : previously downloaded beta 8 and then it automatically updated to beta 12 using update features but for RC1, it does not.
I know users under Windows platform had same problem but was resolved and they can now update via check for update feature.
Please implement for Linux users too.
Thanks !!If you can't update then you can download and install the full Firefox 4 RC version.
* http://www.mozilla.com/firefox/all-beta.html -
created a new folder in bookmarks; when try to add new bookmark, new folder does not appear in drop down menu; using safari for windows
You are using an older version of firefox, upgrade your browser to Firefox 8 and try
* getfirefox.com -
Restore from time machine does not list all my backups. I know they exist but their dates are not present on the restore list. Any help appreciated. If I must use one of these older dates to restore, how do I then get the more current data off time machine?
Ok, so am i correct in saying that the steps to fix are as follows.
That's one option, but not what I meant by restoring in the time-travel view. The latter is what you get when you enter Time Machine.
is the fresh install not going to be able to "see" the time machine backups that I have at the moment.
It should, but sometimes people report that it fails. I'm not sure why that happens. -
I have been trying for two weeks to log into iTunes using my Bank of America Visa Debit card but no progress. Is it that iTunes does not use debit card, I only have a debit card and Not credit card, so does it mean I can't use iTunes .?
I believe if you haven't already setup an itunes account, if you have access to computer with iTunes installed , you can create an iTunes account on that computer with no credit/debit card and then just buy iTunes cards at your local retailer to get credits.
-
Shared printer from a pc does not show up on my printer list.
I have a macbook air and the shared printer from a pc does not show up on my printer list. I know it's available on the network as I have a another pc that has access to it. The Mac did find it at one time but it has since disappeared. Appreciate help.
RichCan you see the CD ripped songs in iTunes itself? Can you then right-click and select "Show in Windows Explorer"?
-
My Reminders app which I sync with iPad shows my AppleID password as a heading for my lists when I have it open on my screen of my laptop or desktop. The iPad does not reveal the password the same way. Desktop is not so worrisome, but I don't understand why this would happen and is especially weird if I have the app open in public on my laptop. Is this a default? What do I do to make sure the list does not show by password? I understand that sharing the Reminders via the iCloud may cause a need to show what Reminder lists are being shared between a device and laptop, but why not a user name instead of the PASSWORD!!!?
Where in the Reminder's window are you seeing the password. Here's what my Reminder's window looks like?
That's Reminders V2.0 on 10.9.4. -
Add Folder to Library option is not available in the latest version of iTunes for Windows. I am using Windows 7 64 bit. Any suggestion ?
CTRL + B will bring up the menu bar, on which is File/Add Folder...
-
When using panasonic remote2 app, videos shot on iPad appear upside down on the television. This does not happen with videos from other sources. Any suggestions?
Hi Steve
worldweary wrote:
Thanks again. I tried channel 13 and it seemed to work better, with less dropouts (albeit not perfect) but sadly my slightly ageing laptop wouldn't recognise the network at all with the Hub set to that channel, so I had to switch it back to 11!
Will try the factory reset at some point to see if that improves things.
I have the same issue with my iPad when streaming videos...like the issue posted on 25-04-2014 18h36 by Steve.
Steve - Can you kinldy clarify how you resolved the problem finally.
I was infact planning to change the iPad or sell it off due to this recurring problem.
Thanks and regards
Siva -
On new IOS 7, when I message contacts, it selects thier old contact number, despite the fact I have deleted/edited their number in my contacts list. Only by going through contacts, can I message the correct number. The old number does not appear there, so I am unsure where "messages" is picking up the old number, it doesn't appear that "messages" is synching with "contacts". Any ideas how to fix this?
On new IOS 7, when I message contacts, it selects thier old contact number, despite the fact I have deleted/edited their number in my contacts list. Only by going through contacts, can I message the correct number. The old number does not appear there, so I am unsure where "messages" is picking up the old number, it doesn't appear that "messages" is synching with "contacts". Any ideas how to fix this?
-
Redemption code from Photoshop Elements 12 purchased from Best Buy does not work 'Oops! This code doesn't seem to be active. Please contact the retailer you purchased the card from, or use a different code.' I have an invoice and the pickup notice from Best Buy. What other information does Best Buy need? What will they do? Will I get a new box? What happened to the days of just typing in a simple s/n?
Redemption Code Help
http://helpx.adobe.com/x-productkb/global/redemption-code-help.html -
since yesterday I have been unable to use FaceTime across all my Apple devices: Iphone 5s, MAC Notebook, and Ipad Mini. It does not connect nor make the ringing sound. Why is this and how can it be fixed?
I am haveing same problem canot find itunes.msi
-
I have 8-10 UiWebView's to load different charts and maps on an iPad, i am using UIScrollView to scroll through each page, problem is while loading of each UiWebView my UiScrollView does not scroll smoothly to other pages horizontally, my query is can i load UiWebView on background and how to make sure the scoll of pages is smooth, even though the loading of UiWebViews may take time.
Note :i have tried disabled scrolling on webview, so when i scroll on the page the scroll event will be of UiScrollView, so believe no conflict with UiWebView.
also in ios 6 i read about suppressesIncrementalRendering = True but i want to support ios5, also as UiWebViews are said to be running on main thread by default, i suspect when loading of webViews and when user tries to scroll the page, the main thread is busy, but i want the scroll of the page to be smooth even though the loading of UiWebViews may take time.You will probably get a faster and more accurate answer if
you repost in the Developers Forum. -
IPad 4 switches off when i am using it, even when battery is fully charged. Restore function (holding down both buttons) often does not work. Cannot power up iPad. I have updated software, restarted computer, but no success. I did restore the iPad about 8 times during the past 2 weeks. Just completed another restore. iTunes says the the iPad has been restored and will restart automatically and appear in iTunes when it is ready. That was 30 minutes ago. iPad still won't start. I am looking down the barrel of yet another fruitless restore. What a crap product.
Try a reset:
Hold the Sleep and Home button down until you see the Apple logo. -
I get the following error when I try to create a Virtual desktop
collection;
"The Virtual desktop template does not meet the provisioning requirements."
although I'm specifing a sysprep'd VM installed WS2012 for a virtual desktop template.
Is there any way to resolve?
Or, is there any couses of this message?
thanks.I realize this is an old thread. I'll post and see if I get a response. If not, I'll create a new thread. My question is how does Microsoft suggest SPLA partners create VDI pools since they cannot license Windows 7 or 8 via SPLA? Why
would you restrict the provisioning to only the desktop operating systems that you won't allow partners to license for deployment?
Are there any plans to change this to include 2008 R2 or WS2012 as the base OS for a VD template?
Rob
Maybe you are looking for
-
Let's say I've got an NSMutableData that I create and use like this: data = [NSMutableData dataWithCapacity:( someNumberOfBytes )]; [data appendBytes:buffer1 length:x]; [data appendBytes:buffer2 length:y]; [data appendBytes:buffer3 length:z]; Where x
-
Error when import BI content 3.5.3
Hi All I have error when import BI content 3.5.3 step at Tcode 'SAINT' (file SAPKIBIFIH.car) for mySAP ERP 2004 (ECC 5.0 IDES). The error occur in step 3/5 after enter SAINT:Passw request. System shown information "<b>Queue SAPKLTHQ10 has not yet bee
-
I am trying to do a select statement from within Visual Basic where my column data has an & stored in it. When I perform this statement it returns no rows because it expected a substitution for the &. Select * from table where column = 'Sanford & Son
-
Contributors : Technical Names ??
Hi, Since 1-2 days, there is a minor bug with the contributors. Indeed, some people are referred to with their internal number (I think) instead of their names : Here is an example for the SAP xApps Forums Top 3 Points: 1. Jo Weilbach (102); 2. I801
-
On my MacBook Pro when I hit "Today" (top left of ical screen) the corresponding date has no highlight color. Yes, I have the screen very bright, but I cannot find where to set the highlight color to highlight today's date. On my mini with cinema dis