Account Team Member:
- This table is used to establish account teams.
- The REQUIRED fields for this table are Account ID, User ID, and TeamMemberRole.
Account Share:
- This table is used to provide Read/Write/Edit Access to accounts, opportunities and cases.
- Records in this table are automatically created (for respective Account ID and User ID combinations) when the records are inserted in the Account Team table. The default access values (as set in the application through sharing) are picked for accounts, opportunities and cases.
- The access values can always be updated (please look at www.sforce.com to see which values can these fields be updated to)
Process for Updating Account Team Share access:
- Use the API to INSERT all the account teams into the AccountTeamMember table (with the proper “AccountID”, “UserID”, “TeamRole” combination).
Please note that this will create records in the AccountShare table for the AccountID and UserID combinations. The DEFAULT account, opportunity, and case access values for these records will be set up to be the same as the Sharing Rules setup in the application.
- Use the API to EXTRACT all the records inserted into the AccountShare table. The criteria should be: AccountID and UserID = AccountID and UserID for the records inserted in Step1, and RowCause = “Team”.
- Modify the account and opportunity access levels appropriately for these extracted records
Please refer to www.sforce.com and view the API documentation to see what values can these fields be modified to (based on the sharing level set up in the application)
- Use the API to UPDATE the account share table with these modified records. Please ensure that the “ID” field for the account share table is mapped to the Account Team Share ID field extracted in Step 2.