I'm trying to obtain a filename of the items of a workflow.
I try to make this:
var title;
Alfresco.util.Ajax.jsonGet(
{
url: Alfresco.constants.PROXY_URI_RELATIVE + "api/metadata?nodeRef=" + nodeRefContext + "&shortQNames=true" ,
successCallback:
{
fn: function(response)
{
if (response.json)
{
title=response.json.properties["cm:title"];
alert(title);
}
},
scope: this
},
failureCallback:
{
fn: function(response)
{
Alfresco.util.PopupManager.displayPrompt(
{
failureMessage: this.msg("message.failure")
});
},
scope: this
}
});
But gives me undefined in the alerts...
I try too with:
var nodeR = search.findNode(fileNodeRef);
alert(nodeR);
But
search is not defined
Any idea how to obtain a filename of the workflow? In the URL I only have the noderef.