Getting Item id from custom context method on Tree Grid View

Hi,

I have two new ItemTypes that i use to add project activities and tasks to the Part ItemType like this:

 Part, Project Activity, and Tasks Relationships

I have created a new query definition and tree grid view to display the structure on a new tab on the Part:

I have also created a custom context menu item with corresponsing method that is intended to set the Done property on the selected task.

The issue i am struggeling with is that i cant get the Item id of the selected row.

var taskItem = aras.newIOMItem('Task', 'edit');
var tgvContext = inArgs.contextParams.tgvContext;
var tgvGrid = tgvContext.grid;
var tgvGridData = tgvContext.getGridData()

var dataObject = tgvGridData.focus[0].row.cells[0].data;
aras.AlertError("Result: " + dataObject);

as shown from the output i get "INVALID_ID_VALUE"

Hope somebody can assist here.

Parents Reply Children
No Data