Jump to content
Microsoft Windows Bulletin Board

Recommended Posts

Posted

Hello everyone,

I'm working with Project Online and trying to retrieve task data via the API. While reviewing the metadata, I noticed that PublishedTasks have a navigation property called EntityLinks, but I couldn't find clear documentation on its purpose or usage.

What I Tried

I attempted the following API requests:

 

Retrieve EntityLinks for a task:

GET https://{sitename}.sharepoint.com/sites/pwa/_api/ProjectServer/Projects(guid'{validProjectId}')/Tasks('{validTaskId}')/EntityLinks

Expand EntityLinks within tasks: 
GET https://{sitename}.sharepoint.com/sites/pwa/_api/ProjectServer/Projects(guid'{validProjectId}')/Tasks?$expand=EntityLinks

Observations

When the project has tasks, the request fails with:


{
    "odata.error": {
        "code": "42, Microsoft.ProjectServer.PJClientCallableException",
        "message": {
            "lang": "en-US",
            "value": "PJClientCallableException: GeneralUnhandledException\r\nGeneralUnhandledException\r\nException = System.NotImplementedException: The method or operation is not implemented.\r\n   at Microsoft.Office.Project.Server.BusinessLayer.EntityLinks.ThrowIfEntityLinksNotSupported()\r\n   at Microsoft.Office.Project.Server.BusinessLayer.EntityLinks.ReadEntityLinksForEntities(Guid[] entityUids)\r\n   at Microsoft.Office.Project.Server.Wcf.Implementation.CSOMImpl.<>c__DisplayClass35_0.<ReadEntityLinksForEntities>b__1()\r\n   at Microsoft.Office.Project.Server.BusinessObjectMethodInvocation.InvokeBusinessObjectMethod(String methodName, IEnumerable`1 actions)"
        }
    }
}

If the project has no tasks, the request returns an empty response without errors:

{
    "odata.metadata": "https://{sitename}.sharepoint.com/sites/pwa/_api/$metadata#SP.ApiData.PublishedTasks",
    "value": [
    ]
}

Other navigation properties (e.g., Predecessors) work fine with a similar request.

Questions

What are EntityLinks, and what do they refer to?
How can they be created via the UI in Project Online?
Is there a way to retrieve them successfully through the API?

I couldn't find references for this error or EntityLinks. Any insights would be greatly appreciated!

Thanks in advance!

View the full article

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...