Author Archives: Stu

Get List Items by Field Value

SharePoint Short #6 To retrieve all SPListItem objects that have a specified field value, instead of writing a CAML query, use the following LINQ statement: public List<SPListItem> GetItemsContainingValue(SPList list, Guid fieldId, string match) { List<SPListItem> matchingItems = (from SPListItem listItem … Continue reading

Posted in SharePoint Shorts | Tagged , | 2 Comments

Validation of viewstate MAC failed in AddWrkfl

I recently added a delegate control to a SharePoint solution. The delegate control was used to dynamically insert a custom user control into the master page. Part of the functionality of this control required the use of hidden fields. Everything … Continue reading

Posted in SharePoint, Workflow | Tagged , , | Leave a comment

Disable SharePoint PeopleEditor

SharePoint Short #5 If you have a requirement to disable the PeopleEditor in SharePoint through JavaScript, the following script will do this for you: function togglePeopleEditor(editor, enable) { // Disables the control but still allows the user to type into … Continue reading

Posted in SharePoint Shorts | Tagged , | Leave a comment

Unable to set value of the property ‘aSettings’

I developed a page, inheriting from LayoutsPageBase which was being displayed in a modal dialog using JavaScript similar to the following: <script type="text/javascript"> function DisplayCustomPopupPage() { var options = SP.UI.$create_DialogOptions();   options.url = "http://urltocustompage/page.aspx"; options.title = "Popup Page"; options.allowMaximize = … Continue reading

Posted in JavaScript, SharePoint | Tagged , | 2 Comments

Get SharePoint Timer Job Name

SharePoint Short #4 As a follow up to my recent post Start SharePoint Timer Job Script, that demonstrates how to start a specific timer job by it’s internal name, the following is a PowerShell script for retrieving the internal name … Continue reading

Posted in SharePoint Shorts | Tagged , | Leave a comment