Checking user permissions against SharePoint artefacts is straightfordward enough, many types within the object model expose a range of overloaded DoesUserHavePermissions(…) methods, the example below checks that the current user has ViewListItems permissions against a list. This example assumes that you’ve already got a reference to the list to check, SharePoint security trimming means that you may … Continue reading Mixing RunWithElevatedPrivileges and SharePoint List Permissions
Continuing on from part 1 of this 2 part series, we discovered the hows and whys of creating InfoPath form instance documents. This post brings together that information and demonstrates the code steps required to create an InfoPath form instance document and post it to a SharePoint document library. First we’ll grab the SharePoint content … Continue reading SharePoint: Programmatically Creating InfoPath Form Instance Documents Part 2 of 2
In this series of posts we will be creating InfoPath form instance (XML) documents programmatically using the SharePoint object model. In contrast to other articles about this subject, we will extract the goo required directly from the InfoPath form XSN file itself, the correct InfoPath XSN file will be determined by the Content Type associated with … Continue reading SharePoint: Programmatically Creating InfoPath Form Instance Documents Part 1 of 2
You want to get the full URL of an SPListItem, but the SPListItem.Url property returns only the server relative URL. You could concatenate together the SPListItem.Web.Url and SPListItem.Url property values, alternatively you can use the ows_EncodedAbsUrl metadata value; The exact form of this metadata value seems to vary according to how it’s used, such as … Continue reading SharePoint: EncodedAbsUrl and the Full URL of an SPListItem.
Like the Spanish Inquisition, “Our chief weapon is surprise…surprise and fear…fear and surprise…. Our two weapons are fear and surprise…and ruthless efficiency……” In part 1 of this 2 part series we created an InfoPath form which used the SharePoint Object Model in it’s code behind to create new Task list items. In part 2 of … Continue reading SharePoint: Using the SharePoint Object Model with InfoPath Form Code Behind Part 3 of 2