61. How to round the double to two decimal places in Apex?
Decimal d = 100/3; Double ans = d.setScale(2) ;
62.In Profile settings, what is difference between “Modify All Data” and “Modify All” ?
Modify All Data : Create, edit, and delete all organization data, regardless of sharing settings.
Modify All : Give Read, Add, Delete permission to selected Object, Create permission is not included in Modify All permission.
63. If i want record level access then what should i use from Salesforce security model?
Ans: Manual Sharing
63. If i want Object level access then what should i use from Salesforce security model?
64. In OWD (Organization wide sharing), can i change the setting “Grant Access Using Hierarchies” for Standard Objects ?
Ans: You cannot change it for Standard Objects However for Custom Objects its possible.
65. What is Mandatory while creating User, Role or Profile?
Ans : Its Profile.
66. In case of Master-Detail relationship, on Update of master record can we update the field of child record using workflow rule?
67. In case of Master-Detail relationship, on Update of child record can we update the field of Parent record using workflow rule?
Ans: Yes, the Master fields are also available for “Criteria evaluation”.
68. While setting OWD (Organization wide sharing), can we change/modify the setting of child record in case of Master-Detail relationship?
Ans: No, Child record is controlled by the Parents setting.
69. What is the need of “Custom Controller” in Visualforce as everything can be done by the combination of Standard Controller + Extension class.
- Sharing setting is applied on standard object/extension by default; In case we don’t want to apply sharing setting in our code then Custom controller is only option.
- It is possible that the functionality of page does not required any Standard object or may require more than one standard object, then in that case Custom controller is required.
70. In class declaration if we don’t write keyword “with sharing” then it runs in system mode then why keyword “without sharing” is introduced in apex?
Lets take example, there is classA declared using “with sharing” and it calls classB method. classB is not declared with any keyword then by default “with sharing” will be applied to that class because originating call is done through classA. To avoid this we have to explicitly define classB with keyword “without sharing”.
Leave a Reply