1

I have users from different countries that need to view data and fields only for the accounts of their country. More in detail, a German user should be able to see fields a,b, c and related lists rel_1, rel_2 if viewing a German account, while for the same account, a Danish user should see only field a without any related list. Still, for a danish account, the danish user should be able to view all its fields and related lists.

How can i achieve this? Record types and field level security are not working for this since users would still be able to view data of other countries by reporting on it.

Thanks in advance

1

Only recordtype and FLS will not serve the use case. You have to work with page layout. (Currently I think you have same page layout for different users profiles).

Displaying and hiding related list can only be done through page layouts.

You need to create separate profile for German User and separate profile for Danish user.

Create separate German User specific page layout and separate Danish User specific page layout.

Finally assign the page layouts to the respective profiles.

Idea is record type can be same but page layout will be different for each profiles.

Update

If you have a requirement to show countries specific data to the respective country users then, in Sharing Settings, mark OWD as Private.

Write criteria based based sharing rule to expose country specific data to respective users.

Otherwise, you can think of using territory management, which helps you to assign accounts based on territory assignment rules.

  • Not even page layouts are enough in this case cause users from a country would still be able to view other countries data through reporting – tony danza Jun 26 '17 at 18:59
  • you are restricting country specific fields though FLS, correct? Do you want that data only be displayed to the country specific users? – Santanu Boral Jun 26 '17 at 19:04
  • check my updated ans – Santanu Boral Jun 26 '17 at 19:09
  • Fls is not enough since we are speaking about the same fields. I need data to be displayed to the country specific users. I am trying with formula clone fieds that will show or not the starting fields depending if the user profile is in the country of the account, but for related lists ive no idea how i would do that (data is in master detail and should not be available not even through reporting). Duplicating the data with formula Is not best practice even – tony danza Jun 26 '17 at 23:03
  • Owd are already private. Point Is that opportunity are shared, therefore also related accounts are shared by sfdc standard – tony danza Jun 26 '17 at 23:04
1

Here is what I understood: You want to restrict FLS on a per-country basis. Not just layout visibility.

The problem here is that the platform just flat out does not work like that.

If you have read access to a field, then you have the access to that field in all the records you can see. This means that if you give access to the Field x to a guy from Denmark, he will have access to see the field's value for all records he can see, even if the account is from somebody from Germany.

You can mitigate on the visibility-side via a VF page, or by leveraging Profiles, RecordTypes and Page Layouts, but you will never be able to restrict access completely (i.e.: api access and reports).

  • 1
    Yeah, the problem for me are the reportage. I could enable reports only for specific users and tell them that if they want something like that, either they see all data in reports or they are not able to see any report. – tony danza Jun 26 '17 at 23:07

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.