Skip to main content
Q: i have to send a mail after every 2 days. how do i implement this?
A: Yes, Time dependent Workflow

Q: Can i pass ID in before insert/update trigger
A: Passing ID in before insert is not possible because there is no record still created.
   In before updated we can pass ID

Q: What is sharing rule and the least restrictive sharing rule
A: Sharing rule must be less restrictive than the ORganization Default Sharing rule.
   OWDs are the baseline security for your Salesforce instance. OWD are used to restirct access. you  grant access through other means like sharing rules, role hierarchy, manual sharing,
   So Sharing rules should not be more restrictive than OWD


Q:Passing parameter from VF page to controller class
<apex:param assignedTo>


Q:Passing parameter from VF page to other VF class
 - through URL
 - Mapobj = ApexPages.currentPage().getParameters();
 - PageReferenceObject.getParameters().put('En',EmployeeName);
 - ApexPages.currentPage().getParameters().get('EN');

Q: what is assignTo in Salesforce?
A setter method that assigns the value of this param to a variable in the associated Visualforce controller.
If this attribute is used, getter and setter methods, or a property with get and set values, must be defined.

Q;What<apex:param> in salesforce?
A parameter for the parent component. The <apex:param> component can only be a child of the following components:
<apex:actionFunction>
<apex:actionSupport>
<apex:commandLink>
<apex:outputLink>
<apex:outputText>
<flow:interview>

Q: What are the types of security in Salesforce.com?
A: http://certifiedondemand.com/overview-of-salesforce-security-model and https://developer.salesforce.com/page/An_Overview_of_Force.com_Security and http://www.terrasky.com/data-security-of-salesforceforce-com-record-level/
   Security is primarily comprised of the following:
Organization Security
Object Security
Record Security
Field Security
Folder Security


Q: Suppose i have related list in a object. How do i avoid showing few specific records in this related list
A:  Use In line VF page concept

Q: can i have custom controller name written in Standardcontroller=''
A: No

Q: what are Best code practices?
A: below are the best practices (https://developer.salesforce.com/page/Apex_Code_Best_Practices)
 #1: Bulkify your Code
 #2: Avoid SOQL Queries or DML statements inside FOR Loops
 #3: Bulkify your Helper Methods
 #4: Using Collections, Streamlining Queries, and Efficient For Loops
 #5: Streamlining Multiple Triggers on the Same Object
 #6: Querying Large Data Sets
 #7: Use of the Limits Apex Methods to Avoid Hitting Governor Limits
 #8: Use @future Appropriately
 #9: Writing Test Methods to Verify Large Datasets
 #10: Avoid Hardcoding IDs

1)If for a object we have set OWD as PRIVATE and at PROFILE level we have VIEW ALL permission enabled.
  Then which all records can a user beloning the profile see?

  Answe r- OWD will be by passed and user can see all records.

2) On a detail page i have a Checkbox. When i click this check box i have to display  a button and when i uncheck this the button should be hidden
   How Can i do this?
 
   Answer - In Std VF page we can Inline VF page using rendered.
 
3) Can we create any number of WF/Arrpoval and validation rules for a object?
   Max we can create 500 WF, out of whihc only 300 can be active
   Max we can create 500 Validation rules, out of whihc only 500 can be active

   4) What are inbound messages?
       HAve to sedn a mail to Salesforce and on receving the email i have insert a reacod how do u do this?

5) I have to deploy 3 class and 2 triggers. My overall Code coverage is 80% but One of the trigger and Class code coverage is 0% Can i deploy the code?
   Even if the overall code coverage is 80% we canot deploy this because.
   Every trigger should have atleast 1% of code coverage. For apex class even if the code coverage is 0% we can deploy but not for gtigger.
   So cannot deploy this .
 
6) Explain how do u provide security with Role and Profiles.
    Consider a object and explain it with respect to it.
Lets say we have Object X, in profile i give Read permission. Which means all users of this profile can read the records of Object X
- To see the obj/fields we use profiles
- can give CRUD permission of that obj
- Is used for providing Structural Type. More like meta data (Record type/object/tab/sobj)
Now Role of a User belonging to this profile is Sales Rep, who comes under Manager.
- Record visisblity in that obj is based on Roles and OWD

7) How many types of sharing is possible in SFDC?
Manual Sharing and Apex Sharing

8) Explain Grant Access through Hierarchy.
This is a feature avaialbe in Force.com
Consider Manager1 who has Emp1 and Emp2 under him
Manager 2 has Emp3 and Emp4 under him
Now Emp1 shares a record with Emp3.
Now Question is can Manager2 See the records shared by Emp1???

Manager2 can see the records only if "Grant Access through Hierarchy " checked.
Other wise Manager 2 cannot view the records.

For standard Objects we cannot change the "Grant Access through Hierarcy". By default is enabled.




 

Comments

Popular posts from this blog

SFDC scenario based interview Questions

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 Question on Triggers 1) What the are events of triggers? - After insert,After Update & After Delete 2) Upsert trigger can call which all events? -After Update & After Insert 3) What is merge operation? 4) Which events will be called during merger operation? - Ans Delete n Update 5) In After Undelete, we cannot see trigger.old, only trigger.new can be seen.True or False?        -TRUE 6) Static variable declarion in trigger is possible,True or false?      -TRUE but it will not work. 7) In After update trigger event to Save a record do we need DML statement? - Yes 8) In before insert trigger event can we have trigger.new and trigger.newmap? - we can only have trigger.new, Trigger.newmap is not possible because still the record is not inserted             and record Id is not generated. 9) Can we have batch/asynchronous method called from a Trigger? - YES 10) Can we ...

Custom Labels

Can we have multiple values in Custom Labels. Yes, Salesforce supports multiple values in custom Labels. How to implement that ? Create a New custom label and provide Multiple values with comma ( , ) separated. Example:   Custom Label Name: School Values: Test,Exam,Tutions How to access this Custom Label in Apex controller / Class file Syntax: System.Lable.CustomLabelName Example:System.Label.School How to access this Custom Label in Visualforce page Syntax: !$Label.CustomLabelName Example: !$Label.School How do we check if TempString is present in the custom label in a controller ? Syntax: System.Label.CustomLabelName.Contains(value) Example: System.Label.School.contains(TempString) How do we check if TempString is present in the custom label in a visualforcepage? Syntax: CONTAINS($Label.CustomLabelName,TextValue) Example: CONTAINS($Label.School,"Text")