I have two Departments who each have different sells, based on a custom object. I would like for Dept A to only see certain fields in the sells which are created in Dept B - and vice versa.

If I wanted to make the sells completely invisible to the different departments it would be straightforward Role-based Sharing Rules. But I don't want to make the records completely invisible, only certain fields. How can I go about doing this ?

Here's the scenario :

Sells object : Sells__c Fields : FieldA, FieldB, FieldC

If a Sells__c record is created by DeptA then I want DeptB to only see FieldA and FieldB - and vice versa.

Thank you.

  • 1
    Field Level Security is by profile, not by record. You'd have to build two profiles, one each for Dept A and Dept B, and set security accordingly. However, this still means that A can see B's records, but only with A's available fields, which might not be what you're aiming for, which might ultimately result in the need for tons of formulas or duplicated fields. – sfdcfox Sep 4 '15 at 18:27
  • I think he means that the same fields would be visible vice versa. So A would see the same fields of sales from their own department that B does when looking at sales from their own department. – NSjonas Sep 4 '15 at 18:28
  • sfdcfox - Yes, I realize Field Level Security is by profile. And I believe you can only either completely cut off visibility to a field - or allow it. I don't believe you can make the visibility criteria-based - can you ? I updated my initial post to draw out the scenario just to make sure we're on the same page here. – Zoom_v Sep 4 '15 at 18:37
  • @NSjonas - I updated my original post to draw out the scenario just to make sure we're all on the same page here. – Zoom_v Sep 4 '15 at 18:37
  • 1
    I guess one kinda or sorta solution would be to have conditional rendering in a VF page. But like I said, that's not a true solution because the different departments could still see the fields of other departments in reports and views. – Zoom_v Sep 4 '15 at 20:22

Depending on how many fields are involved, one solution could be to create a set of fields for each dept.
Primary fields remain: FieldA;B;C
DeptA has read/write only to their own fields.
DeptB has read/write only to their own fields.
DeptA and DeptB no read access to each others or primary fields.
Workflow rule updates primary fields to combine them back for higher level reporting purposes.

  • Jenny - I think I understand what you're describing and I was thinking that as well. Essentially making separate fields = to the original ones. It basically comes down to a TON of IF workflow statements. Not a fun thing. I guess you would have to put both of the fields in all of the reports, assuming both Depts are looking at the same reports. Thanks for your input. – Zoom_v Sep 7 '15 at 2:00
  • 1
    @Zoom_v you might find process builder easier for updating the fields. – Jenny B Sep 7 '15 at 2:03
  • Good point. What a pain though. Sharing Rules need to go to the field level. I'm sure a million people have said that already. – Zoom_v Sep 7 '15 at 2:06
  • @Zoom_v you are definitely not alone... vote it up here success.salesforce.com/ideaview?id=08730000000BrrIAAS! – Jenny B Sep 7 '15 at 2:08
  • oh, and I didn't even mention that there aren't only 2 departments, more like 10. So there would have to be 10 fields made for each one in order to account for each department's viewing rights. Fun stuff. – Zoom_v Sep 7 '15 at 2:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.