One of my favorite list templates in SharePoint is the Survey template. It’s a fun and useful feature that helps you on achieving good survey-like forms with charts and insights. You can make them anonymous, do some customizations and add Branching Logic, which means conditional questions depending on what the user answers. But unfortunatelly there are some drawbacks like the message you receive of You are not allowed to respond again to this survey in SharePoint.
But it has one main behaviour that I just don’t like, that is the message when you try to answer the survey again. Below you can check the message with Custom Errors disabled.
Theorically, the user has the required permission to edit its answers. But unfortunatelly once I try to answer again, SharePoint shows me that message as an error. This is a huge problem for users that don’t understand this message and it can be negative to the system.
Sometimes we have to query a SharePoint list through remote connections using C#. It can happen in a SharePoint App, a Console Application or maybe on an Azure Function. This post will help on performing list operations with CSOM and C# in SharePoint.
Below you can find some code snippets that will help you on integrating SharePoint lists with your application.
Basically, you will have to add the Microsoft.SharePoint.Client namespace.
using Microsoft.SharePoint.Client;
using SP = Microsoft.SharePoint.Client;
The required DLLs for programming these type of solution are:
After adding these references to our project, we can start coding and accessing the data in the SharePoint List you want!
Soon you will notice that everything depends on the ClientContext object, which manages the requests and the data that will be loaded.
In our examples we are going to use the variable siteUrl, that represents the URL for the Site Collection. The variable listTitle will also be used and it represents the Title of the list being used.
I believe these are the basics for consuming SharePoint lists. In the future I’m planning to show some complex examples, more focused on Office 365 and Azure integrations. Thanks for reading and I hope it can be useful to you when you need to perform list operations with CSOM and C# in SharePoint.
Since last year, we received the announcement that some of the SharePoint 2013 certifications were being retired in September of last year. But after that, they extended the deadline to 2017. This new deadline can be explained due there is no new certifications focused on development for SharePoint 2016 have been released yet.
Therefore, here is a set of links that you can use as a study guide to pass on that exam before it is retired. This summary was once made by Martin Bodocky and kept on this blog post “70-488 – Developing Microsoft Sharepoint Server 2013 Core Solutions – Preparation links“. Unfortunatelly, it’s not online anymore, so I decided to provide this information once again at the same time that I must say: Bodocky made everything and helped me on passing this exam, back on 2014.
Sometimes when we are developing a custom solution, we need to get user info programmatically in SharePoint. It doesn’t matter if you need to show a special message to an specific user using its Personal Name or maybe just fill a SPFieldUser column in a specific list, you’ll probably need one of those code snippets to do the trick.
I’m going to split it into Server-side object model for C# developers, REST API (for SharePoint 2013 projects or newer) and the old-fashioned JavaScript object model introduced in SharePoint 2010. Each one wil let you capture the current user or get an user by its ID or login name. After that it’s up to you what you are going to do with the data.
Today I would like to share with you an useful script to help on troubleshooting errors using PowerShell in SharePoint when some unexpected exception happens . This script can help you on tracing the exact cause of a bug in the application while relieving you from opening the entire log file and search for the error message in a not so productive way.
These logs are written by SharePoint and according to Microsoft, this is what you get from it:
“The Unified Logging Service (ULS) is the service that is responsible for keeping an eye on SharePoint and reporting what it finds. It can report events to three different locations:
SharePoint trace logs
Windows Event Log
SharePoint logging database
Where the event is logged (and if it’s logged at all) depends on the type of event, as well as how SharePoint is configured. The ULS is a passive service, which means that it only watches SharePoint and reports on it; it never acts on what it sees.”
For those who want to hide Content Query Web Part when empty, in other words, when it returns not data, this post is for you! The solution won’t require you to dive into XSL world, it’s pure JavaScript. Basically you will drop the code code snippet to your pages and everything will work.
The Content Query Web Part (CQWP) is a great way to query data from other sites and present it inside one page. Content Query Web Part can be used with their default layouts or you can create some if want.
According to a Code Project article: ” This web part is rather nifty and it has many cool features. With the CQWP, you can now control how the content is displayed. We can use html tables to format the display however we wish. This article explains how to customize the CQWP using SharePoint 2010 without any code and deployment. “.
Two years ago I abandoned my old Blogspot site where I used to talk about SharePoint, in Portuguese. I had to leave it behind due my opportunity to study abroad in Japan for one year, by a government program called Science without Borders that was letting Brazilian students to study in a country of their choice.
BUT NOW I’m back to Brazil and already settled into this wonderful culture, so I’ve decided to restart my old project and to try again building this website and publishing information that I find useful. Actually it won’t be just a common blog, because I’m also going to try some fancy stuff working on a personal website which I have more tools to invent and publish new content about not just SharePoint, but other topics. Well, I must admit that the main focus will be SharePoint and Office 365.
You can see below my objectives:
Share some experiences that I will have working with SharePoint and .NET;
Discuss ideas about best practices for coding, performance and information architecture;
Promote some nice content from other bloggers or websites that usually help me in my daily tasks.
Well, I hope I can help you someday and that we can find ways to solve problems together too!
Wiliam is from Porto Alegre, Brazil, currently working as DevOps Engineering Advisor at Dell EMC. He has been working with Microsoft technologies for almost ten years with one year gap studying abroad in Japan attending the Science without Borders program from the Brazilian government. Also he is MCSE Productivity, a SharePoint lover.
Nowadays he is investing the most part of his time on exploring GitLab and Azure DevOps features and helping the company to develop a DevOps culture among its colleagues.
In addition of that, he spends some time on learning Japanese, doing CrossFit and playing real-time strategy games like Age Of Empires. Read More…
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
Recent Comments