Category Archives: SharePoint Shorts

Service Application Proxy Classes

SharePoint Short #7 Looking for a list of the currently available service application proxy classes? Run the following in a console app and et voilĂ : var proxies = from serviceProxies in SPFarm.Local.ServiceProxies from SPServiceApplicationProxy serviceProxy in serviceProxies.ApplicationProxies select serviceProxies;   … Continue reading

Posted in SharePoint Shorts | Tagged | Leave a comment

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

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

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

Security Trim SPNavigationNode

SharePoint Short #3 To have the URL specified by a SPNavigationNode security trimmed, make sure you do not specify the isExternal constructor parameter. Obviously, specifying true for this parameter would not apply security trimming against the link, as you would … Continue reading

Posted in SharePoint Shorts | Tagged , | Leave a comment