none
CSOM read Enterprise Custom Fields from Project RRS feed

  • Question

  • Guys, I have spent couple days trying to figure out, I think, the easy task. I have bunch of fields associated with Project  Entity.

    I am not able to find the way how to read them using CSOM. I am able to get them when using _api/ProjectData... However, I am not able to use OData feed in my Provider Hosted App, it returns Access Denied. 

    Thanks

    Nick


    • Edited by nicksav Wednesday, October 29, 2014 2:21 AM
    Wednesday, October 29, 2014 2:20 AM

All replies

  • Try the custom field collection object.

    projContext = PS.ProjectContext.get_current();

    projCustomFields = projContext.get_customFields();

    projContext.load(projCustomFields );
    projContext.executeQueryAsync(function(){

    //success

    var enumerator = projCustomFields.getEnumerator();

    while (enumerator.moveNext()) {
            var gField = enumerator.get_current();

    var fieldEntity = gField.get_fieldType();

    }

    }, function(sender, args){

    //error

    });

    http://msdn.microsoft.com/en-us/library/office/jj713018(v=office.15).aspx

    http://msdn.microsoft.com/en-us/library/office/jj668801(v=office.15).aspx


    kashif




    • Edited by Kashif Pervaiz Wednesday, October 29, 2014 2:09 PM more detail added
    Wednesday, October 29, 2014 1:41 PM