In my SharePoint-hosted app, I use javascript to apply a content type called "Order" to a list in my app.

When users click "new item" to upload a document, I want that document to derive from my new content type.

Is it possible to programmatically change the content type order to make this "Order" content type the default one? This can of course be done in the GUI, but I need to do it via script.

1 Answer 1


Check this MSDN page: How to: Complete basic operations using JavaScript library code in SharePoint 2013 and look at the paragraph Update a list item

Example for update title from MSDN:

oListItem.set_item('Title', 'My Updated Title');

Change content type for current item (simply):

oListItem.set_item('ContentTypeId', 'your_CTID');
// example
oListItem.set_item('ContentTypeId', '0x010100151C2776E89042529ECEA9A8E1BD6A1D');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.