You need to sign in to do that
Don't have an account?
kar123
Update Account Share Object through data loader - Error
Hi All,
I need to update the Account, Opportunity and Case access for an Account Team Member. Account shluld be Read Only while Oppty and Case should be Private.
I tried exporting the Account Share Object and update the Account, Opportunity and Case access fields to READ, NONE, and NONE respectively using data loader. But I get an error saying Invalid record Id and sometimes I get; iNTEGRITY EXCEPTION: ROW CAUSE (cannot update sharing row with this cause)..pls advise what can be done to fix this.
Thanks.
Figured out. I just filtered my query by adding rowcause = 'Team'.
All Answers
Hi,
I tried the following code to update the Case Access Level.
List<AccountShare> accShareUpdate = new List<AccountShare>();
Id accId = x;
List<AccountShare> accs = [select UserOrGroupId, CaseAccessLevel,AccountId from AccountShare where AccountId =: x];
for(AccountShare accShare: accs)
{
accShare.CaseAccessLevel = 'Edit';
accShareUpdate.add(accShare);
}
update accShareUpdate;
Let me know if it works.
Thanks
Figured out. I just filtered my query by adding rowcause = 'Team'.