1) Consider this scenario I have a profile by name 'ProvideReadAccess' and two users U1 and U2 assigned to it. And I have object X. My Question is I want to have ReadWrite access for U1 and ReadOnly access for U2 for the object X. How do I do this? Answer: Read Access for both users is common hence in the Profile settings give 'Read' access for the object 'X' By doing this User U2 will be able to read all the records( One condition satisfied) but U1 will also be able to only read the records(Second condition not satisfied). So next what do we do is we create a permission set say 'GrantWriteAccess' and in this permission set we give the object 'X' the Write access and assign the user U1 to this permission set.(2nd condition satisfied). Explanation about when and where to use permission set and profile https://success.salesforce.com/answers?id=90630000000grVPAAY 2) Consider a scenario I have not given any CRUD...
Interview Questions Q: What is the data type of Trigger.New? - Trigger.New is of Data Type List (A collection of records). Q: What is the difference between Trigger.New and Trigger.Map? - Trigger.New returns a ordered list of records but Trigger.Map returns a map(Key value pair). Q: What is the difference between User Context and System Context? /What is the difference between running in user Mode or system Mode? - In User Context/Mode the execution of class/method takes place considering the logged in users Permission (Sharing rules, OWD, field level security...) In System Context/Mode none of the permissions associated with the logged in user is considered. The execution takes place as though the user has full fledged rights on everything. Q: Explain the key words With Sharing and Without Sharing. - Consider a Custom Object 'MarksDetail' has OWD security set to 'Private', Now l...