SharePoint REST API – getting user information from list item field

If you are using the SharePoint REST API to fetch list items, you might need to present the user information in a user field of the list item. If you for example have a Task List and want to present the Assigned To field, you will need to build the REST Query in a certain way. Consider doing the following REST query:

http://company.dev/_api/web/lists/getbytitle('Tasks')/items

Continue reading

Localize JavaScript files in SharePoint

In a project I was working on, I needed a way to localize strings in JavaScript files in order to support different languages in the application. The solution was designed to be a SharePoint sandboxed solution, so we could not deploy custom resx files to the file system (this article by Waldek Mastykarz explains how to use ScriptResx.ashx to be able to refer to resource strings inside JavaScript files).

In order to solve the problem, we added one JavaScript file for each language and named it res.cc-ll.js Continue reading