Added setRecord to QueryPermissions