Forum Discussion
christopher_gillis
8 years agoCommunity Manager
Hi Rik,
There doesn't appear to be an easy way through the REST API alone to get the id of an Item property that does not have a data source. I'll file this internally to be added in a future release.
I understand that this functionality isn't critical for your use case, but I did discover a solution that would allow you to get the ID as expected. You can create a server method with code like the sample below.
Christopher Gillis Aras Labs Software Engineer
string wmpId = this.getProperty("wmp_id");
Item wmp = this.newItem("Workflow Map Path", "get");
wmp.setID(wmpId);
return wmp.apply();
You can then call this method through the REST API and pass in the ID of the Workflow Map Path you want to get like:
POST host/.../method.GetWorkflowMapPath
{
"@odata.type": "host/.../$metadata,
"wmp_id": "654FF9665F2F415683722C6AA698A1DE"
}
The body of the response should contain the related_id as expected.
Chris
Christopher Gillis Aras Labs Software Engineer