var groupRecs = $o.execute ({
asArray: true,
select: [
{"a": "id"}, "id" 
],
from: [
{"a": "group"},
"inner-join", {"b": "org"}, "on", [{"a": "org"}, "=", {"b": "id"}]
],
where: [
{"a": "dateStart"}, "=", "28.08.2016", "and", {"b": "orgType"}, "=", common.getId ({classCode: "spr.org.orgType", code: "doo"})
]
});
$o.startTransaction ();
_.each (groupRecs, function (rec, i) {
$o.removeObject (rec.id);
console.log (i, "of", groupRecs.length);
});
$o.commitTransaction ();