Hi,
Requirement: I have folder search to retrieve the folder objects. Each folder might contain one or more documents. There are couple of actions the user can do on the documents. One of them is Delete. Upon Delete would like to insert audit record in to the custom table. Hence I would like to fetch either document property values or document id.
What I have tried so far: Since I do not know how to fetch properties I am trying to fetch the selected document id using below code. so that I call service and do the audit.
aspect.after(ecm.model.Action.prototype, "performAction", function(repository, itemList, callback, teamspace, resultSet, parameterMap) {
var items = [], i;
// Get real items if favorites
if (itemList && itemList[0] && itemList[0].isInstanceOf && itemList[0].isInstanceOf(ecm.model.Favorite) && this.id != "RenameFavorite" && this.id != "EnableSync" && this.id != "DisableSync" && this.id != "DeleteFavorite" && this.id != "OpenFolder") {
for (i in itemList) {
items.push(itemList[i].item);
}
} else {
items = itemList;
}
// Now show your id
if (items && items.length > 0) {
alert('Doc id::'+itemList[0].id);
}
});
Output: The alert always showing repository name instead of document id.
Could you please help me.
#IBMContentNavigator(ICN)#Support#SupportMigration