You can't "block" access, but instead you would "grant" access. To do this, use a Login Flow. You can determine their session type by way of the login flow variables presented to your flow, and, if they meet certain conditions, provide a Session-Based Permission Set to access additional features. The base profile would only have limited access (e.g. Accounts,...
For the Field Sales User:
Uncheck everything in the "Administrative Permissions" and "General User Permissions" sections other than the following:
Chatter Internal User,
Create and Customize Dashboards,
Create and Customize List Views,
Create and Customize Reports,
Edit My Dashboards,
Edit My Reports,
When you compare the ID against the subselect on SetupEntityAccess, you're comparing agains the IDs of SetupEntityAccess, not the SetupEntityId values.
You can't accomplish what you want in a single SQL statement. You need to retrieve the SetupEntityAccess records, extract the SetupEntityId values, then perform another SQL query on the AppMenuItem using ...
In Winter '18, they added an ability to control access to Apex REST Services that is distinct from the API Enabled permission on profiles that provides access to the provided APIs.
This allows you to set up a profile that does not have access to the standard APIs, but gives you access to Apex REST Services. The user will also need access to the apex class ...
Is the permission of Notes and Attachments govern by the parent object like Account, Contacts, Opportuniy?
Please read Guidelines for Working with Notes, as there's a lot in there that I'm not going to repeat here.
You need read access on a record to create a note.
To edit a note, you need edit permission on the note.
To delete a ...
The documentation is never as explicit as this (unfortunately). However, it is nevertheless true. The ordering of the records in the list will be preserved. This is also true for other methods that return lists of objects that don't appear to guarantee order (e.g. Database.insert will return SaveResult objects in the same order as the original DML list).
Role hierarchy works in tandem with Profiles.
Let says a role sales manager reports to VP.
Object permission of Sales Manager profile assigned to people in Sales Manager role is CRUD and for VP is Read, then because of the hierarchy setup, VP role users will have access to all records that are visible to people in Sales manager role, but the object ...
The first master-detail relationship you create on your junction object becomes the primary relationship. This affects the following for the junction object records:
Look and feel: The junction object's detail and edit pages use the color and any associated icon of the primary master object.
Record ownership: The junction object records inherit the value ...