
AX 2012 R3 CU10.
I have a grid in a form that is not a ListPart, so I want to enable a button that deletes the marked rows in a grid and then refreshes the grid.
I've tried this code in my button's clicked method, but it just does nothing:
void clicked()
{
MyFormDataSource2_ds.deleteMarked();
}
*This post is locked for comments
I have the same question (0)That should work. The method is called many places in the standard application code. But if you only have marked one record for your test, it won't work. The pattern should be like this:
ttsbegin;
if (MyFormDataSource2_ds.anyMarked())
{
MyFormDataSource2_ds.deleteMarked();
}
else if (getFirstSelection(MyFormDataSource2_ds))
{
MyFormDataSource2_ds.delete();
}
ttscommit;
MyFormDataSource2_ds.research(true);