我正在尝试更新多个记录权限。当我只更新一条记录的权限时,一切正常,但是当更新多条记录时,什么也没有发生。
List<QBCustomObject> qbCustomObjectList = new LinkedList<QBCustomObject>();
QBPermissions permissions = new QBPermissions();
ArrayList<String> usersIDS = new ArrayList<String>();
...
permissions.setReadPermission(QBPermissionsLevel.OPEN_FOR_USER_IDS, usersIDS);
for (int i = 0; i < qbIdsForUpdate.size(); i++) {
QBCustomObject co = new QBCustomObject("image");
co.setCustomObjectId(qbIdsForUpdate.get(i));
co.setPermission(permissions);
qbCustomObjectList.add(co);
}
QBCustomObjects.updateObjects(qbCustomObjectList, new QBCallbackImpl() {
@Override
public void onComplete(Result result) {
if (result.isSuccess()) {
QBCustomObjectMultiUpdatedResult updateResult = (QBCustomObjectMultiUpdatedResult) result;
progressDialog.dismiss();
} else {
Log.e("Errors",result.getErrors().toString());
}
}
});