kamagra how much to take

Using The ULS In CSOM / Office 365

SharePoint online has really limited availability for error logging built in. Most of the time you have to throw the exception to either standard output, a list, or if it is a provider hosted application using a local text file. None of these options is terrible attractive since SharePoint already has logging availability in the ULS and a lot of fancy tools that allow relevant parsing to occur. Using the ULS off premise isn’t really as easier as it is on premise (shocker). To do it, firstly, you have to make the relevant service reference. This is located here: http://{site...

read more

Add An Item To A Folder To A List With CSOM

Its really similar to how you would do it with traditional server side OM means. This is a static helper method that will generate a new folder in some list. Essentially we just have to spin a ListItemCreationInformation object specified with empty properties and just set the FolderUrl. C# < view plain text > public static ListItem AddItemInFolder(string siteUrl, string listName, string folderPath, ClientContext clientContext) { List list = clientContext.Web.Lists.GetByTitle(listName); ListItemCreationInformation listItemCreationInformation = null; if...

read more

Getting Safe Value From ListItem In Office 365 And SharePoint Online

Reading a ListItem in SharePoint online is nothing fantastic and is pretty similar to reading list items in the throwback server OM models. Consider the below example that starts with a ListItemCollection. We are reading the value of SomeCrap. The problem here is, what if that returns null? That’s an issue. C# < view plain text > ListItemCollection items = list.GetItems(CamlQuery.CreateAllItemsQuery()); list.Context.Load(items); list.Context.ExecuteQuery(); foreach (ListItem item in items) { list.Context.Load(item, x =>...

read more

Error Handling In Office 365 And SharePoint Online

I am sure there is a lot of guidance out there regarding this subject. Personally, as things move more to a client-centric model I believe it is best to surface problems and issues with an application within a user exposable medium, such as a SharePoint list. This is possible to do within a SharePoint app in a relatively generic fashion. It makes it really easy to use. Firstly, consider the two following methods which act as the engines for capturing relevant errors: C# < view plain text > public TValue ErrorHandler<TValue>(Func<TValue>...

read more

Getting The Full, Absolute URL Of A ListItem In Office 365

I don't know why Microsoft made it such a pain in the ass to get the url for most of the proxy objects on the SharePoint server object model, but in Office 365 it is even worse. Here is an example of how to get a ListItem actual URL and the modified date of the item. Following I will throw the values into a dictionary. C# < view plain text > Dictionary<string, string> urlDict = new Dictionary<string, string>(); foreach (List list in ListsToProcess) { ListItemCollection items =...

read more

RunWithElevatedPrivileges In SharePoint Online / Office 365

How bad does it stink that you can’t elevate to the application pool account in Office 365. It used to make things like cross site reads so much easier but from a security perspective totally makes sense it doesn’t exist. There really is no delegated replacement. As a result you are relegated to knowing the actual account name and password, which is annoying, Either way, you can make the process slightly less painless by using the relevant objects within an extension method off a ClientContext object. Here is the extension method: C# < view plain text > public static...

read more