INTERVIEW QUESTIONS

1.) Suppose you are the standard user, you have all the CRED permissions on CAMPAIGN object but you don't have access to create a record, why?
Ans:) marketing user option should be checked for that user to access the CAMPAIGN object.

2.) In approval process, suppose three persons has to approve, if majority people approve then it should approve otherwise it should not be approve?
Ans:) Using standard approval process it is not possible, using dynamic approval process it is possible. In standard approval process all users should approve then only record will get approve.

3.) If the OWD for account object is private then is it possible to access the account record by other users apart form the owner?
Ans:) 1. All the people above the role hierarchy, they can access the records.
          2. By using sharing rules, we can share those records to other users.
          3. Account Team members they can access these records.

4.) If I put "renderas" attribute as "PDF" then it displays PDF document,But i want the same in MSword format.Then how you will do this?
A)<apex:page contentType="application/msWord" cache="true">
  <!-- Begin Default Content REMOVE THIS -->
  <h1>Congratulations</h1>
  This is your new Page
  <apex:form>
  <apex:pageBlock>
  <apex:commandButton value="Button" action="{!method1}"/>
  </apex:pageBlock>
  </apex:form>
  <!-- End Default Content REMOVE THIS -->
</apex:page>
Without "cache" attribute also it works, But in some browsers it doesn't work without "cache" attribute.

5.) If there is a validation rule if amount = 100 then it should display error msg, Then I saved the record by giving value as 1000 then I had written a workflow if amount > 100 then I am updating amount field value with 100. Then what will be the result?
 A) First validation rules will get execute then workflow rules will be execute so the answer is 100 (Even though there is validation rule because of the workflow it will accept 100 in amount field.

6.) What is the difference between task and event?
A) 
Task: Task is nothing but work assigned to a particular person, it doesn't have certain time limit.
Event: It has certain time limit in that time only all persons should assemble after the time limit over, event will get complete.

7.) What the record criteria meets for a time dependent workflow email has submitted in queue which will trigger the email in one month later somebody modified the record which won't meet the time dependent workflow rule criteria, what will happen?
A) 
Email won't be triggered since workflow criteria is not satisfied for the record, salesforce will remove the action to send the email from the queue.

7.) How many ways we can make field mandatory, if the field is mandatory at page layout level and if we try to inert records through data loader with out populating those mandatory fields what will happen?
A) 
In following ways we can make fields mandatory:
1. At Field Level.
2. At the page layout level.
3. Through validation rules.

If the field is mandatory at page layout level then only while inserting records from page layout level if we won't populate the fields with values it will trow error. If we insert records from data loader it won't throw. Even if we mention the record type while inserting record through program it will trow error message.
 

80 comments:

  1. Hi Srinu,
    Your posts are enthusiastic, very useful to me & as well as my friends too. On the other hand I need to appreciate for your extreme efforts shown towards posting the SFDC information on the blog.
    Thank You Mr for all help. :)

    ReplyDelete
  2. Hi bro,your stuff is good..:)

    ReplyDelete
  3. hi srinu hw r u buddy, keep some more interview questions. Your posts are very encouraging.

    ReplyDelete
  4. ur posst tooo good.. please post more questions..

    ReplyDelete
  5. Hi Srinu...its really awesome info that u posting here....thanks alot

    ReplyDelete
  6. Hi srinu great job..... ur blog is simply superbb........

    ReplyDelete
  7. Nag Blog:
    http://learnsalesforcedotcom.blogspot.com/

    ReplyDelete
  8. If I delete a role which is at higher hierarchy what will happen?
    Is it possible to delete a profile which has users assigned to it?

    ReplyDelete
    Replies
    1. Setup>Administraton Setup>Roles

      We need to remove all users both active and inactive from the role otherwise saelsforce won't allow us to delete the role.

      Standard Profiles we cannot delete and if you want to delete a custom profile it should not be associated with any of the user.

      Delete
  9. It is not possible to make pick list value as required.

    ReplyDelete
    Replies
    1. We cannot make a picklist value required at the time of creating the field but at page layout level we can make it required or else we can write a validation rule.

      Delete
  10. In back-end picklist field acts like a text field.

    ReplyDelete
  11. We can write Sharing Rules on User Object.

    ReplyDelete
  12. We cannot delete the user in salesforce, because for the already created records it stores Created Date and Last Modified date.

    ReplyDelete
  13. Error: 'non selective query against large object'
    This is a time out error (more than 10 sec), if we use future method we will get (60 sec).
    refer: https://developer.salesforce.com/forums/ForumsMain?id=906F00000009Da4IAE

    ReplyDelete
  14. Is it possible to write @future inside of the Apex Trigger?
    No, we should not.

    ReplyDelete
  15. permissions sets deployment with Eclipse?

    ReplyDelete
  16. Scenario:
    On Account detail page I need a button called 'Find Contacts'. Whenever user click on that button a new window should open in that window all the contacts which he/she can access should display (which are not available for that user should not display) along with the check boxes. User should be able to select whatever the contact he want after that if he click on 'Send Email' buttons email should go.

    Which controller you use?
    Standard Controller.
    How to respect security?
    use 'with sharing' keyword for the extensions class.
    How to display the contacts with checkboxes?
    Useing Wrapper class.
    What is wrapper Class?
    We store multiple instances of the class in a list. that class might be either inner class or outer class.
    Could you please write syntax for wrapper class?
    public class MyClass {
    List wrapLst = new List();
    wrapLst = ;
    public class MyWrapper {
    public Boolean isTrue {get;set;}
    public Contact con {get;set;}
    public MyWrapper() {
    isTrue = false;
    }
    }
    }

    ReplyDelete
  17. How to track the information that how many times visited and who visited the visualforce page?
    Override the view button and when open the page using action attribute perform DML operation to store the information.
    Note: In Contructor, we cannot use the dml statement.

    ReplyDelete
  18. https://github.com/VivekMChawla/Reference-Materials/blob/master/Salesforce%20DEV-501%20Flascards%20(MASTER%20SET).txt

    ReplyDelete
  19. http://learnsfdc.blogspot.in/2014/11/dev-501-quick-notes.html

    ReplyDelete
  20. Custom Component can specify only controller attribute we cannot use standardController or extensions.

    ReplyDelete
    Replies
    1. Above stmt is wrong:
      Custom Component: we can use controller or extensions attributes but we cannot use standardController.

      Delete
  21. Custom Controller Page Exceptions:
    -----------------------------------------------------
    1. If you don't handle Exception on a VF page exception will show in a different page like below -
    An error message.
    Error is in expression '{!doSomething}' in component apex:commandButton in page customexcepcheck: Class.CustomExcepCheck.doSomething: line 4, column 1

    An unexpected error has occurred. Your development organization has been notified.
    2. If you add apex:Message then also same will repeat as above.
    3. If we handle the exception using try - catch then on the page no error message will display.
    4. In a catch block we have to catch the error and add the message by using apexpages.addMessage() then it will display the error message on the top of the page.

    ReplyDelete
  22. Scenario:
    For the task record upon click on 'Cls' link, Due Date field should be populated with today's date.

    ReplyDelete
  23. Salesforce Basics Book:
    https://books.google.com/books?id=uqRJAgAAQBAJ&pg=PA33&lpg=PA33&dq=fetching+records+which+are+created+today+salesforce&source=bl&ots=DcsJclVemq&sig=FdYvYW5sMDbYPgVJrbSJngbIzH0&hl=en&sa=X&ei=Co6iVPzTO46syASmkYCYAw&ved=0CEkQ6AEwBzgK#v=onepage&q=fetching%20records%20which%20are%20created%20today%20salesforce&f=false

    ReplyDelete
  24. hiiii,can u please post realtime scenarios also....

    ReplyDelete
  25. Apex Developer Guide:
    http://www.salesforce.com/us/developer/docs/apexcode/salesforce_apex_language_reference.pdf
    Visualforce Developer Guide:
    http://www.salesforce.com/us/developer/docs/pages/salesforce_pages_developers_guide.pdf
    Salesforce Migration Guide:
    http://www.salesforce.com/us/developer/docs/daas/salesforce_migration_guide.pdf

    ReplyDelete
  26. Validation Rule wont' work for delete and undelete operations in those situations using apex trigger we can display the error messages.

    ReplyDelete
  27. Scenario:
    Display one of the section fields info of the parent object(assume: Account) in the child object (Assume: Opportunity).
    Solution:
    1. Create a VF page (standardController: Opportunity).
    2. User relationship field to Account in opportunity to fetch Account Info.
    3. Keep the VF Page inside of a section in the opportunity page layout.

    ReplyDelete
  28. Scenario:
    Assume that there are two objects Object_A and Object_B. In Object_A upon entering a email value for one of the email field I need to fetch one of the field value corresponding to the mail in Object_B (assume: one email field exists).
    Solution:
    We should write a trigger for before insert and before update.

    ReplyDelete
  29. Very Good Blog: https://yoafzal.wordpress.com/

    ReplyDelete
  30. Sample Certification Videos:
    http://www.salesforcetrainingpodcasts.com/podcasts/401/

    ReplyDelete
  31. Object Name: ObjectA
    Existing Field Name: SampleA (Text DataType which store parent object name (Assume Parent Object is ObjectB))
    New Field Name: SampleA (Look up to ObjectB)
    After creating the field we need to update the SampleA(Look up fields based on the old SampleA text field value)
    Solution: Write a Batch Class.

    ReplyDelete
  32. owner field on detail object is not available due to that we cannot create the sharing rules, manual sharing and cannot assign queues because all these requires owner.

    ReplyDelete
  33. Assume that there is a picklist field in user object called 'Country'. Upon updating the country picklist value to 'India' for one of the object (Assume Custom__c) automatically user should get CRED permissions(previously user do't have any permission).
    ------
    Solution:
    Enabled CRED permissions on the object in a permission set.
    Programtically fire a trigger on user object and assign the user to the permission set.
    See the below code -
    PermissionSetAssignment pAssign = new PermissionSetAssignment();
    pAssign.PermissionSetId = '0PSj0000000AY0s';
    pAssign.AssigneeId = '005j000000C12Za';
    insert pAssign;

    ReplyDelete
  34. How to avoid sending email to a particular approver in salesforce?
    We can change the email settings on a user detail page for a particular user. Under Approver Settings section of the user detail page check for Receive 'Approval Request Emails to Never' checkbox.

    ReplyDelete
    Replies
    1. 'Receive Approval Request Emails' is a drop down, select as 'Never'.

      Delete
  35. Creating 25 steps in Approval Process -
    ----------------------------------------------------------
    1. We can create only maximum of 15 approval steps for a approval process.
    2. If you want to create 25 steps, create two approval process and for the 15th step of the approval process automatically submit the second approval process.

    ReplyDelete
  36. In case of master-detail relationship, For the detail (child) object we cannot see the owner field.

    ReplyDelete
  37. SELECT Id, Name FROM Account WHERE Id NOT IN (SELECT AccountId FROM Contact)
    Usage of the above query -
    1. If you want to query the account records which are not associated with any contacts.
    2. after 'in' we can include list again no need to convert into set of ids.
    3. after 'in' no need to mention ':'.
    4. After the DML stmt, we can use only List (cannot use set)

    ReplyDelete
  38. Very very Good Blog: http://peterknolle.com/collections-eggstravaganza/

    ReplyDelete
  39. If you want to rename bulk picklist values then download iMacros plug in and record for renaming one picklist value and for the remaining values replace the corresponding urls and picklist values.

    ReplyDelete
  40. Distinct records based on the group SOQL:
    List empLst = [SELECT city__c, COUNT_DISTINCT(name__c)
    FROM employee__c
    GROUP BY city__c];
    system.debug('empLst: '+empLst);

    ReplyDelete
  41. Displaying Error message upon inserting more than one record in a day with out of box functionality.

    ReplyDelete
  42. Deactivating the user who is not logged in last 30 days:
    1. fetching users in batch class start method: SELECT LastLoginDate FROM User where LastLoginDate != LAST_N_DAYS:30
    2. Loop through in execute method and deactivate.

    ReplyDelete
  43. 1. When to use iterable and when to use Database.queryLocator?
    2. If the field history exceeds how to maintain history? Is it possible to insert records into history?
    3. What is opportunity team? Is it possible to insert records automatically?
    4. Lead Conversion mapping the fields?
    5. in a dynamic query, is it possible to use inner query?
    6. is it possible to use set while writing an inner query?

    ReplyDelete
  44. Deleting the records which are shared with apex managed sharing?
    Share records for an object cannot be deleted with out deleting the object record.

    ReplyDelete
    Replies
    1. We can delete the records in share object, refer -
      http://salesforce.stackexchange.com/questions/9076/revoking-apex-managed-sharing-permission

      Delete
  45. Open Activities and Closed Activities will store in which object?

    ReplyDelete
    Replies
    1. Once the task or event time duration reaches then it will be automatically moved to activity history object.

      Delete
  46. 1. While creating the record, field should be displayed but after saving on the record on detail page field should not be displayed?
    A. Create multiple record types and update the record type with the workflow rule.
    2. private variables occupy space in view state?
    3. is Test.stopTest is mandatory?
    4. If we insert records in Test.startTest and Test.stopTest, outside of Test.startTest and Test.stopTest, is it possible to access the records?
    5. Extracted account and contacts from other system, how to insert the records into salesforce?
    A. use external id.
    6. We can use listName.size() on visualforce page?

    ReplyDelete
    Replies
    1. 2. Yes, private variables will occupy space in view state.
      3. No, Test.stopTest() is not mandatory, without that also we can write the test class.

      Delete
  47. We can push the data synchronously by using outbound messages of workflow rules.

    ReplyDelete
  48. What is the maximum size of the trigger?

    ReplyDelete
  49. Max. characters per pick list entry:
    https://help.salesforce.com/HTViewHelpDoc?id=picklist_limitations.htm

    ReplyDelete
  50. searching records with multiple conditions in salesforce?

    ReplyDelete
  51. Version Controlling:
    http://appirio.com/category/tech-blog/2012/12/setting-up-source-control-with-eclipse-force-com-ide/

    ReplyDelete
  52. Governor Limits - DML and SOQL
    -------------------------------
    Number of rows processed by DML statements - 10,000.
    If we are using insert, update, delete statements in a logic, by combining the records of insert (assume that we are inserting 5000), update (assume 4000) and delete (assume 2000). Overall by combining all the records it will be 11,000 records which will hit the governor limits. (It counts against for the entire transaction).

    Number of rows queried by SOQL queries - 50,000.
    If we are using multiple queries by combining all the queries records it should not reach 50,000. (It counts against for the entire transaction).

    Note: In batch class, for each and every batch governor limits will reset.

    ReplyDelete
  53. URL to delete a record: {!URLFOR($Action.Contact.Delete,con.Id)}

    ReplyDelete
  54. For all SalesForce certification latest and exact exam dumps contact us at completeexamcollection@gmail.com.
    Refer our blog for more details http://completeexamcollection.blogspot.in/2015/04/salesforce-certification-dumps.html

    ReplyDelete
  55. Source Scanner --> To verify the security review before submitting review to salesforce.

    ReplyDelete
  56. Field data types supported by outbound message in Salesforce

    ReplyDelete
  57. Workflow rule 1 --> should execute 10 times.
    Workflow rule 2 --> should execute 15 times.
    Workflow rule 1 --> should execute 15 times.
    Workflow rule 2 --> should execute 10 times.

    ReplyDelete
  58. 1. explain a business case and how did u accomplish that
    2.can we update 2 fields for the same object.
    3. how to update a filed based on another field.
    4.user not able to see opportunity object, why
    5.OWd has public but user don't have access.
    6.Salesforce flow
    7.difference b/n databaseinsert , insert
    8.Can I callout from Visual force pages
    9. what are 3 classes in the http request
    10.What are the integrations that you have worked on.
    11. What are the exceptions you have faces during integration.
    12.exceptions at database.insert
    13.do u encounter govener limit exceptions in apex
    14.integration with SOAP API
    15.WraperClass
    16.add a attachment on plain html/visualforce page , what should be done
    17.can we make a field unique in opportunity object
    18.can we perform DML on two objects at a time.
    19.what is page reference in visualforce pages
    20.Batch Apex verser data loader and exceptions in batch apex.
    1. Communities
    2. Partner Portal
    3.Customer portal
    4.how do u access picklists in apex.
    5.how to Sort in the apex code.

    ReplyDelete
  59. Approval to allow updating a field before approving -
    upon opening the record make comments as a editable field, fill and click on save,
    then display change amount button, upon clicking allow changing the amount field value, after populating
    allow to change the field value and save it.

    After saving approver can approve or reject the record.

    ReplyDelete
  60. Map keys are not working if those are having spaces.

    ReplyDelete
  61. Closing Task , populating with today's date:
    action="{!URLFOR($Action.Task.Close , Task.Id, [tsk4=TEXT(MONTH(TODAY())) & '/' & TEXT(DAY(TODAY())) & '/' & TEXT(YEAR(TODAY()))], true)}">

    ReplyDelete
  62. Winter17 feature: Make any custom picklist field required.

    ReplyDelete
  63. Picklist values are following the order of status in picklist for ascending/descending

    ReplyDelete
  64. var variableInstance is Case - Sensitive.

    ReplyDelete
  65. Very useful... your blogs are awesome.. that contains numerous knowledge

    ReplyDelete
  66. Referring formula fields in Rollup Summary field:
    If the formula is referring other object fields it cannot be referred in Roll up Summary field, to use it use TEXT() funciton.

    ReplyDelete
  67. Field Trip to know percentage of data filled for the fields of objects -
    https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003HSXEEA4

    ReplyDelete
  68. each record will be occupied with 2kb irrespective of the data populated in the fields.

    ReplyDelete

Labels