Create a custom list in sharepoint via Visual Studio - sharepoint

I've created a customlist in Visual Studio 2013 and deployed the same in the SharePoint 2013 server. Its working fine and is showing in the "Site Settings -> Site Features" area of my sharepoint site. This will allow the user to activate/deactivate it. But, my site may be a big one in size and I want to create a lot of lists via VisualStudio. So, Is it possible to avoid listing it in "Site Features" area ? This is not listing for lists available in SharePoint, when we add it via UI?

What you see in Site Features section is sharepoint feature not list it self. You can include any number of lists in one feature.

Related

SLK - Assignement List Web Part is missing

I deployed and activated the SharePoint Learning Kit (SLK) to my SharePoint 2013 Foundation according to this video. In the video there is a Web Part called "Assignment List Web Part". But I don't have this one in my Web Part Collection.
I have all SLK Features activated but the Web Part is still missing.
Is my solution corrupted or is SLK not capable with SharePoint 2013 Foundation?
You have to activate the WebPart on Site Collection level.
Select Site Actions | Site Settings to get to the site setting page.
Under Site Collection Administration select Site Collection Features.
Activate the feature.
This will add the "Assignment List Web Part" to the WebPart gallery.
http://blog.salamandersoft.co.uk/index.php/2010/07/sharepoint-learning-kit-1-5-features-you-can-activate/
For further questions regarding SLK, you might ask them on the Codeplex SLK Discussion Board.
There you have the chance to discuss your questions with other people facing the same problems and even the developer himself.

Site Columns & Content Types Missing during VS Development

Just getting into SharePoint development however we're encountering an issue following nearly every tutorial!
Site Columns & Content Types do not seem to appear in SharePoint after Deploying an app via VS 2013!
We're currently following this Channel9 tutorial. Fairly straightforward - they create an app, add a Column & Content Type and at 37 minutes in they deploy their app to SharePoint. After doing so they navigate to Site Settings -> Site Columns and can see the column created in the project.
We however don't see this! The 'site column' and 'content type' aren't listed in SharePoint 2013.
This occurs with every tutorial we've followed, the content type and column simply isn't there. Any ideas where we're going wrong? Are we missing a step?
Note: The only differences from what we're doing to the Channel9 tutorial is:
We create an "App for SharePoint 2013" whereas they're using a "SharePoint 2013 Empty Project" template.
They seem to be using a local sandbox environment and we're using a Developer Site on our Office 365 / SharePoint online instance
That the difference:
We create an "App for SharePoint 2013" whereas they're using a
"SharePoint 2013 Empty Project" template.
When develop app your create "another site" isolated from your host where your app is installed, your site column and content type are here.
Try to create a Sharepoint 2013 Empty Project and you see the Site Column and Content Type on your host site.
Check this link to see Apps for SharePoint compared with SharePoint solutions

Allow Content Editor Web Part

Using SharePoint 2007, how could I allow the adding of CEWP's to the selection menu of an "Add a Web Part" dialog while in Edit Page mode? As of the moment, I can only add Announcements, Calendar, Links, Shared Documents, Tasks but I do not have the ability to add a CEWP. I have full access to the site.
At Site Settings > Site Features > Site Collection Features, you will want to have the Office SharePoint Server Publishing Infrastructure set to active.
Then, on the site, go to Site Settings > Site Features, and activate the Office SharePoint Server Publishing feature. You should then be able to add the content editor web part to the site.
Quite often I see SharePoint 2010 websites without the Content Editor webpart (MSContentEditor.dwp)
To enable this web part you need to activate the BasicWebParts feature on that site. I did not find an option to do this by the web site admin; you can enable the feature however by using SharePoint powershell.
Execute the following statement in the SharePoint Powershell and the Content editor web part will be added to your site
Enable-SPFeature 00bfea71-1c5e-4a24-b310-ba51c3eb7a57 -Url [SharepointSiteUrl]
To get the SharePoint site url just run
Get-SPSite
Gertjanvanmontfooort blog
I ran into a similar issue in SharePoint 2010, but I couldn't see other webparts due to my user permissions on the Site Collection. After getting "Restricted Read" rights on the Site Collection I could see all of the different WebParts.
Here is what helped me fo Sharepoint 2013 Online (Office365):
http://answers.microsoft.com/en-us/msoffice/forum/msoffice_o365admin-mso_manage/problems-opening-a-site-from-sharepoint-designer/d1e71427-be3f-4ea7-be3b-8ba6b64af76c?page=2&auth=1
Basically, I had to set flag DenyAddAndCustomizePages to 0 using sharepoint power shell.
Moreover, from time to time I had to reset the flag to 0 as the online sharepoint seems to reset it to deafult 1.
After trying all the above, and other proposed solutions, my eventual success was through PowerShell script. Admittedly I did check that Custom Scripts was permitted and I did have to Activate the two "SharePoint Server Publishing" features described above, but as I am using a sub-site I presmume something else must have been messed up. In the end the following script allowed me to see the Content Editor option when adding a Web Part:
SET-SPOSite -DenyAddandCustomizePages 0
The full article can be found here:
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_o365admin-mso_manage/problems-opening-a-site-from-sharepoint-designer/d1e71427-be3f-4ea7-be3b-8ba6b64af76c?page=2&auth=1

Sharepoint 2010 add,edit,delete forms replace to custome visual web parts

It`s possible in sharepoint 2010, will set up a list of custom data source and then adapt new input forms from visual web parts which will replace the existing add, edit and delete forms?
if it is possible, then how?
Here is an article on MSDN that describes how to use InfoPath to customise the Display, Edit and New forms for external list data (business connectivity services).
Just like in SharePoint 2007 you can change the association of the New, Edit and Display forms using SharePoint Designer in SharePoint 2010. You can create new ASPX pages, or use InfoPath forms as per the above. These ASPX pages can contain the functionality you want directly, or host visual web parts with the right permissions.
Here is an article that describes how to change the associated forms for a list with SharePoint Designer. I would recommend creating new pages and associating the list to those rather than trying to update the existing pages. This avoids any problems if the out of the box files are updated by a service pack / hotfix etc, and also allows you to revert to the out of the box forms if needed.

SharePoint 2010 VS development: Intellisense for ASPX files

I'm using Visual Studio 2010 to develop a SharePoint Server 2010 solution. Part of this includes custom Page Layouts, but when editing them, intellisense is completely broken, since Visual Studio doesn't appear to know how to handle them. Here's what I've done:
Created a new blank solution
Right-clicked on the solution and created a new "Empty SharePoint Project"
Right-clicked on the project and created a new "Module"
Renamed sample.txt to MyPageLayout.aspx or created a new ASPX Web Form
At this point, intellisense for the new Page Layout is broken. It gets even worse with tools like ReSharper installed. Also, things like "Format Document" will break the Page Layout (by for example changing asp:Content to asp:content)
What I've tried to get intellisense working:
Added a Web.config from a standard Web Application Project to the root of the SharePoint Project - made no difference.
Added the ProjectGuid for a Web Application Project to the SharePoint project file - broke the project.
Is there any way to get intellisense, and the rest of the support Visual Studio can offer for Web Forms, available when developing SharePoint 2010 Page Layouts?
I have followed your post to some extent.
Using VS2010 (On an x64 machine)
Create a blank SharePoint solution. (this properly combines your #1 & #2)
Add a module (in SharePoint a module is like a folder or resource container)
added a new class to the module (intellisense present)
Added a new webpart to the module (intellisense present)
added a user control to the project designer works and (intellisense present)
I believe that you should consider creating true server or visual web parts. This will have a harder learning curve but will pay with dividends in the future. You will be able to package and deploy your solution again or to another server/farm. Aspx pages can be added and manipulated by the dreaded SharePoint designer. In 2010 the theory is that those designer mods can be packaged and deployed.
I work in this environment every day and the best advice I can give is to embrace the SP object model and do 'it' the sharepoint way. Don't try to force SP to be something its not. :)
This is probably not the solution you are looking for but it's the best thing I found for SharePoint development.
In your solution, create 2 projects :
1 SharePoint Project (empty or not)
1 ASP.NET web application project
Develop all your UI (aspx pages, ascx controls, etc.) in your ASP.NET project and create post-build steps that will copy the pages and controls to the appropriate folders in your SharePoint solution.
That way, you will benefit from all the features of web development in visual studio and it will be very easy to deploy as well. It is a bit of a time investment at first, but it is well worth it if you have any considerable amount of logic to implement in your aspx pages.
This blog post documents what you need to do.
you can add an intellsense to pagelayouts by closing the page and simply reopen it from
file->openfile->your file page layout path
Or you can directly "Right Click" on the file you want to open from the Solution explorer and then select "Open" : you'll get the Intellisense !

Resources