none
list enterprise templates RRS feed

  • Question

  • how to get a list of names of enterprise templates through CSOM (need for Project Online)

    through PSI I know how it's done

    ServiceReferenceForProject.ProjectSoapClient client = new ServiceReferenceForProject.ProjectSoapClient();
    ServiceReferenceForProject.ProjectDataSet.ProjectDataTable dataTable = client.ReadProjectStatus(Guid.Empty, ServiceReferenceForProject.DataStoreEnum.WorkingStore, string.Empty, (int)Project.ProjectType.Template).Project;

    but I need through CSOM!

    help me, please)

    Tuesday, October 14, 2014 4:32 AM

All replies

  • Hi,

    Have you looked at the ProjectContext.EnterpriseProjectTypes property?

    See link below:

    http://msdn.microsoft.com/en-us/library/office/microsoft.projectserver.client.projectcontext.enterpriseprojecttypes_di_pj14mref(v=office.15).aspx


    Hope this helps,


    Guillaume Rouyre, MBA, MVP, MCP |

    Tuesday, October 14, 2014 12:43 PM
    Moderator
  • Maybe off topic, but in case you want to use REST:

    _api/ProjectServer/EnterpriseProjectTypes


    kashif



    Tuesday, October 14, 2014 3:24 PM
  • I don't understand how it can help ?
    Wednesday, October 15, 2014 4:52 AM
  • Hi,

    As far as I know this is not possible. I would expect it should be possible using the Projects collection filtered on ProjectType. But the Projects collection is a collection of the published projects only so the project templates are not included there.

    var projList = projContext.LoadQuery(projContext.Projects);
    projContext.ExecuteQuery();
    
    String firstTemplateName = projList.First(proj => proj.ProjectType == ProjectType.Template).Name

    Wednesday, October 15, 2014 7:40 AM
  • find solution!

    http://www.umtsoftware.com/blog/2014/09/29/how-to-project-online-psi/

    But how to get SharePointOnlineCredentials by default ?

    Thursday, October 16, 2014 11:43 AM