1

I'm trying to update multiple records Permissions. When I update just one record's Permissions, everything works well, but when updating multiple records, nothing happens.

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());
        }
    }
});
Mickäel A.
  • 9,012
  • 5
  • 54
  • 71
Cohelad
  • 121
  • 9

1 Answers1

1

It looks like there is a bug in this request. We create issue on it and will fix it in near future. You can update permission one by one record currently.

vfite
  • 126
  • 2