Salesforce Interview Questions Part 4

Salesforce Interview questions Part 4 Navy Blue

78. What is a formula field?

Answer :

Formula field is one of the field in salesforce which is a read only field means users cannot edit and enter any values in this field.  

The value of the formula field  is evaluated from the formula or expression defined by us. 

Formula fields can be created in both standard object and custom object.

If we change the expression of formula then automatically the value of the formula field will be updated.

 

formula field

79. What is the maximum character limit of formula field?

Answer :

  • We can write a formula field with a maximum of 3600 characters and a maximum number of characters  displayed after an evaluation of a formula expression is 1,300.
  • Cannot exceed 4000 bytes when saved and cannot exceed 5000 bytes when compiled.

80. What can we do if the requirement for formula field is very complex and it exceeds character limit?

Answer :

We can either divide the logic into multiple formula field and get the desired output in one formula field using the result of those other formula fields, or we can write trigger if it is very complicated.

81. Which type of fields cannot be used in the formula field?

Answer :

Long text area, encrypted, or Description fields cannot be used in formula fields.

82. What is the difference between ISPICKVAL() and INCLUDES()?

Answer :

ISPICKVAL is used for single picklist value and INCLUDES is used for multi-select picklist values in formula fields or validation rules.

83. Explain the difference between ISNULL() and ISBLANK()?

Answer : 

  • ISNULL() and ISBLANK() have the same functionality, but ISBLANK() can be used for both numbers and text, but ISNULL() can be used only for numbers.
  • Use ISBLANK() instead of ISNULL() for any new formulas.

84. What are the return types for formula fields?

Answer : 

  • Checkbox
  • Currency
  • Date
  • Date/Time
  • Number
  • Percent
  • Text
Formula return type

85. What will be the return type of formula field when we have to find the difference between two dates? Ex: Date of joining minus today?

Answer : 

  • Number
  • Since the difference between two dates will be a number like 30 days completed since joined

86. What are cross object formula fields?

Answer :

  • Cross object formula fields are built using referencing the fields from another related object.
  • It can be related to other object either using master-detail or lookup relationship. 
  • Always cross object formula fields can be created on child object by referring the field from a parent object.

87. What are the validation rules?

Answer :

  • Validation rules are used to enforce the user to enter correct data.
  • Validation rules are executed when the record is created or updated.
  • When the user enters the wrong data, then an error message will be displayed on the page and record will not be saved.
  • Validation rules are specific for the fields.

88. Is there a way to avoid deletion of records using validation rules?

Answer :

No. Validation rules cannot be used to avoid deletion of records because it executes only on insert and update.

89. How to ignore or bypass validation rules?

Answer :

We cannot ignore or bypass the validation rule, but when we want to avoid running validation rule while doing the data uploads, then we can deactivate the validation rule and activate it again after the completion of data load.

We can add a condition in the validation rule to not run validation for specific profile or users. This means that those profiles or users does not have that validation. But if the users have validation rules applied then there is no way it can be bypassed

90. Can we run validation rules only for new records and not while updating the records?

Answer : 

  • Yes, we can use ISNEW() function in the validation rule to run the validation rules only for new records.
  • When ISNEW() returns true the new record is getting created, and when ISNEW() returns false, then the record is updated. Based on this condition, we can run validation rules only for new records.

91. Can we use validation rule to make the field mandatory and why we use validation rule for this instead of using page layout or making a field required when creating the field?

Answer :

  • Yes, we can use validation rule to make the field mandatory. In a scenario when we want to make the field mandatory based on some condition or based on data of some other field, then we can use a validation rule
  • Ex: When the user enters opportunity status = ‘Close – Lost’ then we can make field LostReason mandatory. So that we can enforce user to enter the lost reason when the opportunity is lost.

92. Can we restrict a user to login into salesforce after office hours?

Answer :

  • A record type is used to differentiate different business processes, picklist values and page layout for different users.
  • For example, if we use record types to differentiate computer science Course and Non-Computer Science Course then
  • Record Type = Computer Science
  • Picklist field = Course (java, oracle, C++, Python)
  • Non-Computer Science Course then
  • Record Type = Non Computer Science
  • Picklist field = Course (Autocad, CAD, CAM, MATLAB)

93. Which picklists are not available for Record Types?

Answer :

These are some special picklists which are not available for record types.

  • Opportunity Stage
  • Case Status
  • Solution Status
  • Lead Status   

Because these are exclusively used for sales processes, support process, lead processes and solution processes.

94. Is there any limit on the creation of record types?

Answer :

While there is no limit on no. of record types can be created, but it is best practice to limit total record types to 200.

95. What is dependent picklist?

Answer :

  • A dependent picklist is a picklist whose values are dependent on the values of another picklist.
  • The other picklist can be a controlling field which controls or derives the data of the dependent field.
  • Multi-Select picklist can be used as a dependent picklist, but it cannot be used as a controlling field whereas checkbox can be used as a controlling field, but it cannot be used as dependent field.

Alternately you can watch one of my edureka youtube video:

Related Posts

Salesforce Dynamic Forms for standard object workaround

Salesforce Dynamic Forms for standard object workaround : Salesforce recently released dynamic form functionality which is a very impressive salesforce feature. However, at the moment we can only use them…

Salesforce Dynamic Form

Dynamic form is the newest addition in the evolution of lightning record pages. It adds the ability of point-and-click customization for your lightning record pages which previously required custom coding.…

Workflow Rules vs Process Builder

workflow vs process builder Automating business processes in salesforce can make your applications reasonably convenient. Uses can immediately feel the difference of how business process is making their every day…

Salesforce Interview Questions Part 9

Salesforce Interview Questions Part 9 COMMUNITIES 176. What are communities in salesforce? Answer: Communities are a great way to provide access to a subset of our org to the external…

Salesforce Interview Questions Part 8

SERVICE CLOUD 162. What is Service Cloud? Answer: Service Cloud refers to the services or customer service module in salesforce.com. It includes cases, solutions and knowledge articles, entitlements and Assets.…

Salesforce Interview Questions Part 7

SALES CLOUD 141. What is sales cloud? Answer: Sales cloud refers to the sales module in salesforce.com CRM. It includes lead, account, contacts , contracts, opportunities , products , price…

3 thoughts on “Salesforce Interview Questions Part 4”

    1. we can add a condition in the validation rule to not run validation for specific profile or users but cannot bypass using custom permissions.

Leave a Reply