• CloudyRitu
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

Hello Mates, I am dealing with the issue of controlling record level access to Account associated contacts.

 

I have a scenario where user from B2B sales profile is getting access to Account record "A" via team assignment (with help of Accountshare). With this sharing now B2B sales user is able to see all the associated contact records (B2B type and CBSI type). 

 

Similarly when CBSI sales profile user is assigned to above Account record "A" with similar assignment he will also see  associated contacts having record type B2B & CBSI.

 

Requirement is that when B2B sales user is assigned to Account A, he should only be able to see contacts that have record type as B2B and not having record type as CBSI. Similarly if i assigned CBSI sales user to this Account A then he should only able to see CBSI contacts and not B2B contacts. 

 

Please advice how this can be achieved.

 

Note - When we perform user assignment to account via accountshare it is like manual sharing (Automated using trigger)

 

Please help.

Hello Mates, I am dealing with the issue of controlling record level access to Account associated contacts.

 

I have a scenario where user from B2B sales profile is getting access to Account record "A" via team assignment (with help of Accountshare). With this sharing now B2B sales user is able to see all the associated contact records (B2B type and CBSI type). 

 

Similarly when CBSI sales profile user is assigned to above Account record "A" with similar assignment he will also see  associated contacts having record type B2B & CBSI.

 

Requirement is that when B2B sales user is assigned to Account A, he should only be able to see contacts that have record type as B2B and not having record type as CBSI. Similarly if i assigned CBSI sales user to this Account A then he should only able to see CBSI contacts and not B2B contacts. 

 

Please advice how this can be achieved.

 

Note - When we perform user assignment to account via accountshare it is like manual sharing (Automated using trigger)

 

Please help.

 

 

I've written a trigger in my sandbox to copy the primary contact Role and ID values into 2 opportunity custom fields but it's not firing and I just cant figure out why.

 

Any help would be appreciated, I'm sure it's an oversight on my part.

 

Trigger PrimaryContactCopy on Opportunity(before insert,before update){
OpportunityContactRole Roles = new OpportunityContactRole();
for(Opportunity opp:Trigger.new){
Roles = [select Id,IsPrimary,ContactId, Role from OpportunityContactRole where IsPrimary=True AND opportunity.id=:opp.Id];
opp.Name__c = Roles.ContactId;
opp.Email__c = Roles.Role;
update opp;
 } 
}

 

  • December 13, 2010
  • Like
  • 0