I'm trying to figure out how I can get a list's add new item URL using JSOM in SharePoint 2010. This is what I have so far to get if the current user has edit access on the list.

    var clientContext = SP.ClientContext.get_current();
    var list = clientContext.get_web().get_lists().getByTitle("Shared Documents");
    clientContext.load(list, 'EffectiveBasePermissions');
    clientContext.executeQueryAsync(Function.createDelegate(this, function()
            // has edit permissions
    }), Function.createDelegate(this, function(){}));
}, "sp.js");

2 Answers 2


Load DefaultNewFormUrl property of the list. Example:

clientContext.load(list, 'DefaultNewFormUrl');

Then retrieve it in the success method:

var newUrl = list.get_defaultNewFormUrl();

I guess your are looking for SP.List.defaultNewFormUrl property (sp.js).

var value = SP.List.get_defaultNewFormUrl();

Try following

var list = clientContext.get_web().get_lists().getByTitle("Shared Documents");
var listNewForm = list.get_defaultNewFormUrl();

PS: MSDN documentation reads that

Applies to:

apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

I think it should work in SharePoint 2010 also. Try and let me know.


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.