Jawab Read Deliverable from Task

  • 18 April 2012 11:08
     
      Memiliki Kode

    Hi,

    i'm trying to use PSI (2007) to get deliverable linked to a task in my project (in Project Professional all seems to be working fine), but when iterating from the results, all i get is the task itself and not the object... below is the code i'm using:

    WebSvcObjectLinkProvider.ObjectLinkProvider objectLinkProvider = new WebSvcObjectLinkProvider.ObjectLinkProvider();
                objectLinkProvider.Url = "http://server/pwa/_vti_bin/psi/objectlinkprovider.asmx";
                objectLinkProvider.Credentials = new NetworkCredential("user", "pwd", "domain");
    
                WebSvcObjectLinkProvider.ObjectLinkProviderDataSet dataSet = objectLinkProvider.ReadTaskLinkedWebObjects(projID, (int)WebObjectDatabaseType.Commitment);
                    
                List<int> ret = new List<int>();
    
                foreach (WebSvcObjectLinkProvider.ObjectLinkProviderDataSet.WebObjectsRow row in dataSet.WebObjects)
                    if (row.WOBJ_TASK_UID != projID)
                        ret.Add(row.WOBJ_TP_ID);

    I've tried using user account for the project manager and even my farm/ps admin with no luck. Tried every method in WebSvcObjectLinkProvider with same results. any hints in how i could get the deliverable linked to a task with the PSI (or even reading directly the list in WSS Project Site), all i need is its Title.

    TKS!

Semua Balasan

  • 19 April 2012 18:32
     
     Jawab Memiliki Kode

    I just found the answer, it was here:

    (int)WebObjectDatabaseType.Commitment

    the enumerator was probably used in the wrong way and returning '6' when it was supposed to return 32.

    • Ditandai sebagai Jawaban oleh Bruno Correa 19 April 2012 18:32
    •