I create empty dataSet and fill after data. I have only 2 fields itemid and parentid.
I try to setup relation between 2 fields. It works if I use global variable on left side and failed if I use actual Field . Why? Here the last part of code
var rel = solutionModel.newRelation(‘myRelation’, ItemDataSource, ItemDataSource, JSRelation.INNER_JOIN);
rel.initialSort = ‘itemid asc’ // ‘sortseq asc’;
rel.allowCreationRelatedRecords = true;
rel.allowParentDeleteWhenHavingRelatedRecords = true;
this part works:
rel.newRelationItem(‘scopes.globals.glb_item_id’, ‘=’, ‘parent_id’);
this part failed
rel.newRelationItem(‘item_id’, ‘=’, ‘parent_id’);
The code doesnot bomb,just myRelation not created
How to setup relation programmatically on the temporary tables(memory buffered dataset).