You need to sign in to do that
Don't have an account?
test vijay
Apex test class Issue for AccountShare object
hello Guys,
Greetings,
Please give me any way how to solve it.
Thanks In advance
Greetings,
for (Account a : [SELECT Territories__c, (SELECT UserOrGroupId from Shares WHERE RowCause='Territory'), (SELECT UserId, TeamMemberRole FROM AccountTeamMembers) FROM Account WHERE Id IN :accountIds]) { if(!a.Shares.isEmpty()) { for(AccountShare s : a.Shares) { //tMap.put(s.UserOrGroupId, null); system.debug('UserOrGroupId===> ' + s.UserOrGroupId); system.debug('RowCause===> ' + s.RowCause); } }Actually, I have stuck in this. I want to create a Account Where AccountShare.RowCause='Territory'
Please give me any way how to solve it.
Thanks In advance
Related:https://salesforce.stackexchange.com/questions/255603/what-is-rowcause-in-share-object
Thnaks for your response,
but I have seen this referance and I want to cover this method from my test class.can you tell me what shouldl I do for it.
Thank you