Google adds

Monday, April 1, 2019

All Governor Limit

Number of SOQL queries: 100
Number of query rows: 50,000
Number of SOSL queries: 20
Number of DML statements: 150
Number of DML rows: 10,000
Maximum CPU time: 10,000
Maximum heap size: 60,00,000
Number of callouts: 100
Number of Email Invocations: 10
Number of future calls: 50
Number of queueable jobs added to the queue: 50
Number of Mobile Apex push calls: 10
Active validation rules per object - 100
Custom apps - 10
Custom fields per object - 500
Custom objects - 400
Tabs - 100
Users: maximum created - 2
Custom report types - 400
Dynamic dashboards per org - 3
HTML .htm, .html, .xhtml  - 5 MB
PDF .pdf  - 25 MB
PPT .ppt, .pptx, .pptm  - 25 MB
RTF .rtf  - 5 MB
Text .c, .cpp, .css, .csv, .ini, .java, .log, .sql, .txt - 5MB
Word .doc, .docx, .docm  - 25 MB
XLS .xls, .xlsx, .xlsm  - 5 MB
XML .xml  - 5 MB
Lead Status - 100
Task Status - 100
Opportunity Stage - 100
Mass Email Limits
You can send mass email to a maximum of 5,000 external email addresses per day per org based on Greenwich Mean Time (GMT).
Role hierarchy -
salesforce license - 2
active flows - 500
rules - 2000
code coverage - 30,00,000 characters
data storage - 20MB
Record Limit - 5MB
Assignment, Auto-Response, and Workflow Rules Limits
Chatter Answers Limits
A question in Chatter Answers can receive up to 500 replies.
Custom Field Limits
Custom Picklist Limits
Limits for customized selection lists that let users pick values from a predefined list of entries.
Custom single-select picklists can have:
Up to 1,000 values
Up to 255 characters per value
Custom multi-select picklists can have:
Up to 500 values
Up to 255 characters per value
Users can select up to 100 values at a time on a record.
General Email Limits
an email with a 25 MB attachment
Mass Email Limits
You can send mass email to a maximum of 5,000 external email addresses per day per org based on Greenwich Mean Time (GMT).
Active validation rules per object - 100
Custom applications - 10
Custom fields per object - 500
Custom objects - 400
Custom Tabs - 100
Users: maximum created - 2
Max number of custom obeject - 400
Max number of fields per object - 500
Max number of user account - 2
Max number of validation rule - 100
Max number of custom app - 10
Max number of Tabs - 100
Max number of Master Details Relationship - 2
Max number of Custom Report - 400
Max number of file attachment - 2GB
Max number of people you can add to chat - 10
Max number of HTML - 5MB, PDF - 25MB, Word - 25MB, XLS - 5MB
Max number of Approvel Prcess - Approvel process per org - 1000, Approvel process per object - 300
Max number of custom logo - 20KB

Saturday, September 29, 2018

Salesforce InterView Question

1. For which criteria in workflow "time-dependent workflow action" cannot be created?
    Ans: created, and every time it’s edited

2. What is the advantage of using custom settings?
     Ans: You don't have to query in apex (fire select query) to retrieve the data stored in custom settings.

3. What are the different workflow actions available in workflows?
     Ans: 1. Field update 2. Email alert 3. send Outbound messages 4. Create new task

4. What is whoid and whatid in activities?
    Ans: Whoid is the id of either contact or Lead. Whatid is the id of the related to record in activity       record(standard or custom object)

5. What is the difference between a standard controller and a custom controller
     Ans: standard controller inherits all the standard object properties, standard button functionalities can be directly used. The custom controller defines custom functionalities, a standard controller can be extended to develop custom functionalities using the keyword "extensions"

6. Can you have more than one extension associated with a single page?
     Ans: Yes we can have more than extensions.

7. If the page is having multiple extensions and if two extensions have methods of the same name.     Then which method out of these two will be called upon calling from the VF page?
  Ans: The one which is present in the controller defined on the left side will be called.

8. What are governor limits?
     Ans: Governor limits are the limits imposed by salesforce so as to avoid monopoly by orgs in using salesforce shared resources.

9. how can we implement pagination in visualforce?
    Ans: use standard set controllers for implementing pagination.

10. What is the difference between force.com and salesforce.com
       Ans: force.com is PaaS(platform as a service) and salesforce.com is Saas(software as a service)

11. What is an external id in salesforce
       Ans: It is a field that can be used to store a value that is used as a reference for that record in other systems. For example, if you have a record in system 'XYZ where it is referenced by some value then that value can be used as an external id in salesforce for that record. External id can be used for upsert operation in data loader

12. What happens upon lead conversion?
       Ans: When the lead has converted a contact, account and optionally an opportunity is created.

13. What are different ways of deployment in salesforce?
       Ans: Changesets, eclipse and ANT

14. How can you override a list button with a visuaflorce page?
       Ans: Visualforce page should be a list controller that is it should have the "recordsetVar" attribute defined in the page tag.

15. Is it possible to bypass Grant Access Using Hierarchies in the case of standard objects?
      Ans: No. This is default and cannot be changed.

16. How can you call a controller method from javascript?
Ans: Use the action function component to call the controller method from javascript.

17. How can you call a visualforce page from a controller method?
Ans: Use page reference object for calling a visualforce page from controller method

18. How can you sort a select SOQl query?
Ans: use order by clause in select query for sorting a list of records

19. How much code coverage is needed for deployment?
Ans: Each trigger should have a minimum of 1%. A class can have 0%. But, the total code coverage of 75%.

20. Can 'set' store duplicate values in it?
Ans: No. Set only stores unique values. The list can have duplicate values in it.

21. Can two users have the same profiles?
Ans: Yes

22. How can you refresh a particular section of a  visualforce page?
Ans: This can be done using reRender attribute 

23. How can you create many to many relationships in salesforce
Ans: This can be done by creating a junction object between the two objects.

24. What happens to a detailed record when a master record is deleted?
Ans: detail record gets deleted.

25. What happens to a child record when a parent record is deleted(look up relationship)?
Ans. Child record remains undelete 

26. How to get the currently logged-in user's id in apex?
Ans: Use Userinfo.getuserid() to get the currently logged-in user's id in apex.

27. How to convert a CSV file browsed in the visualforce page into a string.
Ans: use csvfilecontents.tostring(). method to convert blob to string

28.How many records can a select query return?
Ans: As of now it can return up to 50000 records.

29. How many records can a SOQL query return?
Ans: as of now it can return up to 2000 records

30. How to fire dynamic queries in SOQL?
Ans: Using the database. query
     Example: List<account> accList = Database.query('select name from account');

31. What is a bucket field in reports?
Ans: This field is used for the custom grouping of values in a field. This can be used in summarising the report.

32. What are dynamic dashboards?
Ans: Dashboards which run for logged-in user are dynamic dashboards

33. Can the dynamic dashboards be scheduled?
Ans: No they cannot be scheduled.

34.How can you use a custom label; on the visual force page?
Ans: Use this syntax for accessing custom labels on the visualforce page - {!$Label.Samplelabel}

35.What are the types of custom settings in salesforce?
Ans: List type and Hierarchy type

36.What are the different types of collections in apex?
Ans: There are three types of collections in apex language
     1. Set
     2. List
     3. Map

37. What are maps in apex?
Ans: Map has keys and values. A key points to a single value. The map can be used to store relationships between two entities. Keys in map are unique. Values can be duplicated.

38. What are the different types of object relations in salesforce?
Ans: 1. One to many
     2. Many to many
     3. Master-detail

39.Can you have roll-up summary fields in the case of the parent-child relationships?
Ans: No. These are present only in the case of a master details relationship.

40. Can you see a lead that is converted in salesforce UI?
Ans: The detail record is not seen. But a page, wherein it shows the links for a formed account, contact, and opportunity.

41. What is the difference between action function and action support?
Ans: Action functions can call controller method from javascript, action support adds support to other components.

42. What is action poller in visualforce?
Ans: Action poller sends AJAX request with a specified time interval.

43. What are the different types of reports available in salesforce?
Ans: 1. tabular report
     2. Summary Report
     3. Matrix Report
     4. Joined Report

44. How many active assignment rules can you have in lead/Case?
Ans: You can have only one active assignment rule at a time

45. How do we access the static resources in visualforce?
Ans: Use this syntex for accessing static resource {!$Resource.Testresourcename}

46. How to embed a visual flow in a visualforce page?
Ans: Use this syntex to embed flow in vf page : <flow:interview />

47. How to enable inline editing on the visauforce page?
Ans You can enable inline editing in the visualforce page by using <apex:inlineEditSupport> component.

48. What is a trigger. new in a trigger?
Ans: trigger. new is a list of records that are in the context of trigger or because of these records(modification, Creation, deletion) the trigger has been called

49. How do we bulkify the trigger?
Ans: Bulkfification requires iterating over all the records in trigger context
     for example : for(account ac: trigger.new){
                       // your logic here        
                   }
50.How can we get the old value in a trigger?
Ans: use trigger.old map for getting previous values of fields.

51. Can we modify records directly in the trigger. new?
Ans: trigger. new is a read-only list, but field values can be changed in the case before the trigger

52. What does the error "list has no rows for assignment" mean?
Ans: it means the list you are trying to access has no values in it.

53. Why should we not write a select query within for loop?
Ans: Writing select query within for loop may hit the governer limit of 100 select queries.

54. What should we do to avoid view state errors on the visualforce page?
Ans: Clear unused collections, define a variable as transient.

55. What is a sandbox org?
Ans: It is the exact copy of your production org.

56. What is SOQL?
Ans: a select query that can return records of multiple objects as a list of lists

57. How many records a select query SOQL can return?
Ans: as of now the limit is 50000

58. What is the full form of AJAX?
Ans: it stands for asynchronous Java and XML

59. Why do we need to write test classes?
Ans: Salesforce does not allow deployment in production if the test coverage is less than 75%

60.How can you show a custom error message in a trigger?
Ans: This can be done using addError() method in the trigger

61. What is the use of future annotation?
Ans: Future method starts execution when Salesforce has resources available. That is for asynchronous execution.

62. How to identify if a class is a test class?
Ans: test class always begins with @isTest

63. How to convert a blob variable into a string?
Ans Use toString to convert blob into a string

64. what are the different methods of batch apex class?
Ans: start method, execute a method, and finish method

65.What is' with sharing' in the apex class code?
Ans: When you use 'with sharing', user's permissions and field-level security are respected. In the case of 'without sharing' code runs in system mode.

66. How many records can a SOQL return?
Ans: It can return 2000 records as of now as per governers limit

67. Can you use dml statement in visualforce compoenent controller ?
Ans: To use DML in the visualforce component you have to declare allowdml=true in the visualforce component otherwise you will get an exception
      "DML is currently not allowed"

68. Can you write SOQL in trigger>?
Ans: Earlier this was not allowed but now SOQL is allowed in triggers.

69. Which are the different access modifiers in the apex?
Ans: 1. Private 2. Public 3. Protected 4.Global are the four access modifiers allowed in the apex

70. Can you change the master of a detailed record in salesforce?
Ans. Yes provided you have ticked marked "Allow reparenting" in a field setting otherwise the field is read-only and the master cannot be changed.

71. How can you lock records in the apex?
Ans: use For an update in the query to lock the record. For example: [select id,name from contact limit 10 For update];

72. IS there any limit on the number of items that can be stored in apex collections?
Ans: There is no such limit but we need to consider a heap size limit of 6MB (6 MB as of now)

73. How can you monitor future actions of time-based workflow?
Ans: setup --> administration set up --> monitoring --> time based workflow

74. What is the visual force component?
Ans: It is a piece of code that can be reused. It can be encapsulated in other visualforce pages.

75. Ho can you display the status of an AJAX update request on a visualforce page?
Ans: To display AJAX request status we can use <apex:actionstatus> component.

76. How can you access the custom label in apex:
Ans: Example --> string custLabelstr = System.Label.LabelNamehere

77.How can you get all the keys of a map variable?
Ans: USe method keyset() for this
     Example = Set<id> idSet = mapname.keyset();

78. How can you compare the values of a picklist field in the validation rule?
Ans : for comparing picklist value use ispickval
      ISPICKVAL(picklist_field, text_to_compare)

79. What are the different types of sandboxes in salesforce?
Ans: Developer, Developer Pro, Partial Data, and Full are the 4 types of sandboxes in salesforce.

80. With what frequency can you refresh a full copy sandbox?
Ans: full copy sandbox can be refreshed every 29 days from production.

81. How can you make fields required on a visualforce page?
Ans: mark required = true as done in the example below:
     <apex:inputfield value="{!account.Description}" required="true"/>

82. What is the minimum coverage for every trigger for deployment?
Ans: every trigger should have a minimum coverage of 1%. Total coverage should be 75%

83. What is the minimum coverage for every class for deployment?
Ans: There is no such requirement. A class can have 0% but the total coverage should be >75%

84. How can you implement custom functionality for a standard controller visualforce page?
Ans: This can be done by associating a controller class with that standard controller using "Extensions"

85. How can you get the current record id on a visualforce page?
Ans use ApexPages.CurrentPage().getparameters().get('id') to get the current record id in visaulforce page.

86. Can a user change his own profile in salesforce?
Ans: No, a user cannot change his own profile !!

87. Can a user change his own role?
Ans: Yes this can be done !!

88. Reset security token option is unavailable in set up. What could be the reason?
Ans: If in the profile setting "login ip ranges" have been set up then the option of "reset security token" is unavailable.

89. How can you skip the record type selection page(and take up the default record type) while creating a new record of a particular object?
Ans: just tick mark against the object by navigating to the following :
     set up --> my personal information -- > Record type selection --> check against the required object

90. What are the different data types that a standard field record name can have?
Ans: Record name field can have either of the two data types: Auto Number or Text data type

91. Can you edit an apex trigger/apex class in a production environment?
Ans: No apex trigger /class cannot be edited in production.

92. Can you edit a visualforce page in a production environment?
Ans: Yes this can be done.

93.How can you deliver a visualforce page in excel form?
Ans: use contentType="application/vnd.ms-excel#Contacts.xls" in page component of visualforce page

94. What is a trigger. new?
Ans: It is a list of records in the current context in a trigger.

95. What does it mean when you get the error "too many SOQL queries 101 salesforces"
Ans: It means you are hitting the limit of 100 SOQL queries as per the governers limit

96. How can you create an input field for a date on a visualforce page?
Ans: To create an input date field on the VF page you will have to bind it with an existing date field on any object.

97. How can you convert a text to an upper string?
Ans: stringname.toUppercase();

98. How can you convert an integer into a string?
Ans: string.valueof(integerName);

99. What are the different types of email templates that can be created in salesforce?
Ans: Test, HTML (using Letterhead), Custom (without using Letterhead), and Visualforce.

100. How can you display different picklist values for picklist fields in different page layouts?
Ans: This can be done using record types.

101. Can you do a DML in the constructor?
Ans: No. This cannot be done. You cannot do a DML within a constructor

102. What are the data types that can be returned by a formula field?
Ans: 1.Checkbox 2. currency 3.Date 4.Date/Time 5.Number 6.Percent 7.Text

103. Can you create a new profile from scratch?
Ans: No, you have to clone from an existing profile and modify the settings as required.

104. What are custom labels in salesforce?
Ans custom labels are custom text values that can be accessed from apex codes and visualforce pages.

105. What is the character limit of the custom label?
Ans: Custom labels can be only 1000 characters long, not more than that.

106. How long can a sandbox name be?
Ans: It can only be of up to 10 characters not more than that.

107. Can you use sharing rules to restrict data access?
Ans No, sharing rule can only give wider access to data it cannot restrict data access.

108. Can you edit formula field values in a record?
And: formula fields are read-only and cannot be edited.

109. Can you edit roll-up summary field values in a record?
Ans: No, roll-up summary fields are read-only and cannot be edited.

110. How can you create a relationship between two objects in salesforce?
Ans relationship can be set up by creating either a lookup relationship field or master-detail relationship fields on objects.

111. Can you create a roll-up summary field on the parent object?
Ans: Roll-up summary fields can only be created if the relationship between objects is master-detail type.

112. How, can you place an entire visualforce page on a different visualforce page?
Ans - This can be done using include attribute.

113. How can you hard delete records in apex?
Ans - use empty recycle bin method as below
    ex-  delete myAccList;
         DataBase.empty recycle bin(my AccList);


114. What all data types can a set store?
Ans - A set can store all primitive data types and sObjects but not collections.

115. What is the use of the offset keywords in a SOQL query?
Ans - Using offset keyword return the records starting from the desired location in the list. For example, if we specify offset 8 then all the records starting from location 9 onwards would be returned.


116. How can you display an image as a field in a detail page of the record?
Ans - This can be done using the IMAGE function. A URL of the image stored in the document should be given in the image function

117. When a lead is converted into account/contact will the trigger on account/contact fire?
Ans - In set up we can enable or disable whether triggers should run on conversion.


118. What happens to contacts when an account is deleted?
Ans - When an account is deleted all the contacts under it get deleted.
119. What is a sObject type?
Ans - sObject refers to any object that can be stored i force.com platform database. ex. sObject s = new contact()


120. How many elements can be stored within a collection(list, set, map)?
Ans - There is no limit on the number of elements that can be stored in a collection. However, we need to consider the heap size limit.

121. Expand SOQL and SOSL.
Ans - SOQL- Salesforce object query language, SOSL - Salesforce object search language.

122. What is the difference between SOQL and SOSL?
Ans - SOQL can query records from a single object at a time, while SOSL can query records from multiple objects. SOQL returns a list while SOSL returns a list of lists.

 
123. How can you query all records using a SQL statement?
Ans - This can be done using the ALL ROWS keywords. This queries all records including deleted records I recycle bin.

124. What is the use of @future annotation?
Ans - Using @future annotation with a method executes it whenever salesforce has resources available.

 

125. What are the different access modifiers that can be used with methods and variables?
Ans - Global, Public, private and protected
126.  What is the significance of static keywords?
Ans - Methods, variables when defined as static are initialized only once when class is loaded. Static variables are not transmitted as part of view state for a visualforce page.

 

127. Can the custom settings be accessed in a test class?
Ans -  Custom setting data is not available default in a test class. We have to set the see AllData parameter true while defining a test class as below.
          @isTest(seeAlldata=true)
128. What is the difference between role and profile?
Ans - Role defines record level access while profile defines object level access.

 
129. On which objects can you create Queues?
Ans - Queues can be created on two standard objects (Lead and case) and also on all custom objects.

130. What are the different ways to invoke apex code?
Ans - Apex code can be invoked using DML operation(trigger), Apex class can be scheduled using a schedulable interface(ex. batch apex), apex code can be run through developer console, an apex class can be associated with a visualforce page.

131. Can you create sharing rules for detail objects?
Ans - No. Detail objects cannot have sharing rules as the detail objects do not have an owner field with them.

132. How can view state error be avoided?

Ans - Use transient keyword with variables wherever possible, clear unused collections. Use 1 form tag on a visualforce page.

133. Consider that a record meets workflow criteria for time-based workflow action, the action goes in the queue. Later, before the time-based action is triggered, the same record gets modified and the criteria previously met is changed and now it does not meet the workflow criteria, what happens to the time-based action placed in the queue?

Ans - The time-based workflow action is removed from the queue and will not get fired.

Ans - Sharing rules extend the record/data access level which is set using OWD, role hierarchy. Sharing rule cannot restrict the data visibility but can only widen it.


135. Which all field data types can be used as external ids?

Ans -  An external id can be of type text, number, or email type

136. What is a mini page layout?

Ans - Mini page layout defines fields and related lists to be displayed in hover detail and console tab. Whenever you hover the mouse over any recently viewed record the fields are displayed, the related list is not displayed(fields can be set in mini page layout). Console tab fields and related lists on the right-hand side are also controlled by the mini page layout.

137. What is the use of the console view/console tab?

Ans - Console gives list views and related list records for multiple objects on a single screen without any customization (visualforce page or controller)

138. What is @future annotation in apex?
Ans - It is used to indicate that code should be executed asynchronously when salesforce has available resources.


139. What are the different considerations that must be followed when using @future annotation in the apex method?
Ans - 1. The method must be static 2. It must return void and 3. method can have an argument of type primitives, collection of primitives or arrays of primitives
 

140. How can you execute batch apex programmatically?
Ans - Batch apex can be invokde using Database.executebatch(). Ex- Id batchprocessId = Database.executebatch(mybatchapexclass,200)

141. How can you set the batch size in batch apex?
Ans - This can be set using optional scope parameter in database.executebatch (batchapexname,batchsize) example - Id batchprocessId = Database.executebatch (mybatchapexclass,200) in this example batch size is set to 200


142. How can you monitor batch apex jobs?
Ans - Batch apex job can be monitored by navigating to your name --> setup --> monitoring --> Apex jobs

143. What is the difference between List type custom setting and Hierarchy type custom setting?
Ans - List type stores static data that can be used in apex code as it is examples could be country codes, currencies, etc
          Hierarchy type stores data that may change depending on the user, profile, or org-wide default


144. Where can custom setting data be accessed?
Ans - Custom setting data can be accessed in formula fields, validation rules, workflow rules, apex, API

145. What different return types can be returned by SOQL?
Ans - A SOQL can return a list of objects, a single object, or an integer  

146. What are the different exceptions in the apex
Ans - Apex exceptions can be built-in or we can also create our own custom exceptions. Exception class is the superclass of all the built-in exceptions. So as to create a custom exception the class name should end with the string 'exception' and it should extend any of the built-in exception classes or other custom exception classes.

147. What different access modifiers can be used for apex classes?
Ans - Apex classes can have either of these three access modifiers 1. Private 2. public 3. global

148. What different access modifiers can be used for class members?
Ans - Class members can have any of these four access modifiers 1. global 2. public 3. protected 4. private

149. What are the governers limit in salesforce?
Ans - Governers limit are run time limits that are enforced by salesforce. Governers limits are reset per transaction.

150. What is an apex transaction?
Ans - An apex transaction represents a set of operations that are executed as a single synchronous unit.

151. What does heap in apex mean?
Ans - Every apex transaction has its heap. Heap is nothing but the garbage collected at the end of every apex transaction.

152. How many callouts to external service can be made in a single apex transaction?
Ans - A total of 10 callouts are allowed in a single apex transaction

153. What is the maximum allowed time limit while making a callout to an external service in apex?
Ans - maximum of 120 second time limit is enforced while making callout to external service


154. How can you expose an apex class as a REST web service in Salesforce?
Ans - An apex class can be exposed as a REST web service by using the keyword '@RestResource'


155. What are custom controllers?
Ans - Custom controller is an Apex class that implements all of the logic for a VF page without leveraging standard controller


156. Can a custom controller class accept arguments?
Ans - No. A custom controller cannot accept any arguments and must use a no-argument constructor for the outer class.


157. What different types of methods can be defined for VF controllers?
Ans - getter methods, setter methods, and action methods


158. What are getter methods, setter methods?
Ans - Getter methods retrieve data from the controller while setter methods pass data from page to controller.


159. What is Organisation Wide Default in salesforce? 
Ans - Organization-wide default is used to set the default access levels for various standard objects and all custom objects. Default access can be set as Public read-only, Public read-write, Public read-write, and transfer for different objects. For example, if the record access level is set to private then the records will be accessible only to owners, users above in role hierarchy, and if it shared using manual sharing.

160.  Can you set default access in Organization-wide default for detail objects (detail object in case of master-detail relationship)?
Ans - No, the Detail object will always have default access as 'Controlled by Parent' and it cannot be changed.

161. Can you create sharing rules for detail objects?
Ans - No, this cannot be done.


162. Can standard objects appear as detail objects? 

Ans - No, you cannot have a standard object as a detail object in the case of a master-detail relationship.

163. What are the differences between list and set?
Ans- 1. Set stores only unique elements while list can store duplicates elements
         2. elements stored in the list are ordered while those stored in the set are unordered.


164. What various default accesses are available in OWD?

Ans - Private, Public Read-only, Public read-write, Public read-write transfer, controlled by the parent, Public full access

165. What are the different types of reports in salesforce?
Ans - tabular, summary, matrix and joined


166. Can a user not have a role?

Ans - Yes, this is possible, Role is not mandatory for users.

167. Can a user not have a profile?
Ans - No, a user should always have a profile. The profile is mandatory, unlike the role.


168. How many custom fields can be created on an object?

Ans -   Initial limit is 500 fields and if needed this can be extended to 800 by raising a case with Salesforce.

169. Max how many records can be retrieved by a SOQL query?
Ans - As of today SOQL query can retrieve you up to 50,000 records

170. Max How many batch apex jobs can be concurrently inactive or queued up status?
Ans- There can only be 5 batch apex concurrently inactive state/Queued as of today.


171. What is the default timeout of callouts (HTTP requests) in a transaction?
Ans - Default timeout for callouts is 10 seconds

172. When a sandbox is refreshed does the organization ID of that sandbox remain the same?
Ans - No, the organization id changes every time the sandbox is refreshed.


173. Given a salesforce record id, how can you identify the object from the 18 digit id?
Ans - First 3 characters signify the object and all the records of that object will always start with those 3 characters. For exam account records start with 001
 
174.  In analytical snapshots, can the target object have triggered?
Ans - If the target object has a trigger on it, the analytical snapshot will fail.


175. What are the different custom tabs that can be created in salesforce?
Ans - Three types of tabs can be created 1. Custom object tab, 2. Visualforce Tab and 3. Web Tab


176. When writing a sharing rule, whom can you share the records with?
Ans - Records can be shared with Roles, Roles and Subordinates, and Public groups.

177. Can you have assignment rules on custom objects?
Ans - No, custom objects do not have assignment rules

179. Can you use single permission Set for multiple users?
Ans - Yes, this can be done. Permission set once created can be added to multiple users in the related list of user detail page or at once for multiple users through Setting up.

180. Can analytical snapshots continue working properly if the running user is inactivated?
Ans - No, the snapshot will fail if the running is inactive.


181. Can you import User data through the import wizard?
Ans - No this cannot be done.

182. Can you import Custom objects data through import wizard?
Ans - Yes, custom object data can be imported by import wizard.


183. If you have a custom object acting as detail to a master-detail relationship (a standard object), what will be its organization-wide default set to?
Ans - The OWD for detail object will always be 'Controlled by Parent' and this cannot edit.

184. In the salesforce MVC architecture, where will you categorize standard or custom objects?
Ans - Standard or custom objects fall under a model layer of salesforce MVC.


185. View or Edit permission on document, report, or dashboard depends on whether the user has access to the folder in which they are stored, TRUE or FALSE?
Ans - Yes this is TRUE.
186. What are the different types of groups that you can create in Salesforce?
Ans - Two types of groups can be created in salesforce 1. Public Group and 2. Personal Group

187. What is the use of permission sets?
Ans- Permission sets can be used to extend a user's functional access without changing the assigned profile.

188. How can you prioritize the batch apex jobs pending in the queue?
Ans: This can be done by reordering jobs from setting up -> Apex Flex Queue Or can even be done through apex code.
     We can use FlexQueue methods to do this in apex. Example: moveAfterJob,moveBeforeJob, etc

189. How many records can a SOSL query return?
Ans: A SOSL Query can return up to 2000 records only.

190. How many @future method invocations are allowed per apex transaction?
Ans: 50 future method invocations are allowed per apex transaction
191. What is the total heap size limit in the case of synchronous and Asynchronous transactions?
Ans: 6MB in case of synchronous and 12 MB in case of Asynchronous transactions

192. How can you track the progress of a scheduled job through apex?
Ans: This can be done query the object CronTrigger which stores all the relevant information like the number of times the job was run, next run time, etc.

193. How many scheduled jobs can you have at one time?
Ans: We can have up to only 100 jobs scheduled in the org.

194. How can you make callouts in @future methods?
Ans: this can be done by mentioning callout=true
      @future(callout=true)

195. How can you expose your class for external application as a REST resource?
Ans: This can be done by using the annotation @RestResource 

196. When is @HttpPut annotated method calls in case of REST?
Ans: This method is called when a put request is sent which creates or updates.
197. Can a map key hold a null value?
Ans: Yes a key can be a null value.

198. What happens when you add an entry that has the key which already exists on the map?
Ans: This overwrites the already existing value against that key.

199. Can you have 2 different keys of type string only differing in case?
Ans: Yes this is possible as the keys of type string are case sensitive and can have multiple similar strings differing only in case.

200. Do test classes count against the apex code limit for the organization?
Ans: No classes marked as isTest are not counted against the apex code limit.

201. What is the use of creating remote site settings?
Ans: A apex callout can successfully call the external site only if it is defined in a remote site setting else the callout fails

All Governor Limit

Number of SOQL queries: 100 Number of query rows: 50,000 Number of SOSL queries: 20 Number of DML statements: 150 Number of DML rows: 10,...