Monday, July 4, 2016

How to set row Key on table after rollback/commit operation

/** * Generic Method to call operation binding **/ 
public BindingContainer getBindings() 

return BindingContext.getCurrent().getCurrentBindingsEntry(); 


BindingContainer bindings = getBindings(); 
//Get Iterator of table 
DCIteratorBinding parentIter = (DCIteratorBinding)bindings.get("IteratorName"); 
//Get current row 
key Key parentKey = parentIter.getCurrentRow().getKey(); 
//You can add your operation code here
OperationBinding ob= bindings.getOperationBinding("Rollback"); 
ob.execute(); 
OperationBinding ob1= bindings.getOperationBinding("Execute"); 
ob1.execute(); 
//Set again row key as current row 
parentIter.setCurrentRowWithKey(parentKey.toStringFormat(true)); 


No comments:

Post a Comment