Be Careful when Using Method setDeferredGroups

There is a default batch group named 'Changes' for the v2 OData model. Method setDeferredGroups is used to set (not add) defer batch groups, which means calling this method will overwrite existing batch groups. Thus, if you don't want to impact existing groups, instead of calling this method directly, we'd better do below.

oModel.setDeferredGroups([...oModel.getDeferredGroups(),"NewDeferredGroup"]);

This is to append the new deferred group instead of removing existing groups.

Comments