Salesforce Developer Interview Questions

1. Difference between queueable and batch apex?  Batchable Apex: If it is a long-running complex process then you should go for Batchable Apex and you can have an option to schedule the batch to run at a customized time. It can process up to 50 million records in asynchronous mode. 5 concurrent jobs are allowed to run at a time and future methods are not allowed in the Batch class. Batch Class should implement Database. Batchable interface and it should have three methods start(), execute() and finish() methods. Queueable Apex: It comes in handy when you need to have both the operations of Batch and future method and it should implement Queueable Interface. If one job is dependent on another job means here we can chain the dependent job in execute method by system.enqueuejob(new secondJob()); You can also able to chain up to 50 jobs and in the developer edition, you can able to chain up to 5 jobs only. It will accept non-primitive types like sObjects and it also runs in asynchronous mo

Salesforce Admin Interview Questions

 1. What is Profile?

  • A profile is a set of permissions and settings. Profile settings decide which data the user is able to view and permissions decide what the user is able to do with that data.
  • A basic condition for user creation is a profile. without a profile, user-level creation is impossible.
  • Each user has a single profile that determines which data and functionalities are available to them.
  • The settings in A user's profile decide whether we can see a specific app, tab, field, or record type.
  • The permissions in a user's profile control whether you are able to create or update records, run reports and customize the application.
  • Profiles are typically associated with the job role of a user, such as a system administrator, recruiter or recruiting manager, but you can create profiles for anything that makes sense in your Salesforce org. A profile can be allocated to multiple users, but each user can have only one profile.
  • To create a profile, go to,
    • Setup-> manage users-> profile->new profile.


2. What is a Role?

  • Roles are technically optional, but it’s a good practice to use them.
  • Roles are mostly used to share records with users.
  • When the organization-wide default sharing for an object is set to less than Public Read/Write, you may utilise Roles in Sharing Rules to control which records (and whether they are Read-Only or Read/Write) users can see.
  • Roles also have a hierarchy like an organization chart, so that the sharing can cascade beyond records users need, but also for managers to access their team’s records.
  • Roles control Records (RR). They are used to control records in salesforce. Each user is assigned one role. No such configurations like profiles are required for roles. It works with Hierarchy but you need to set up a hierarchy for roles.
  • To set up roles level hierarchy. Go to,
  • Setup-> Manage Users-> roles.
  • For example,
    • Top-level role managers can see all his bottom level roles records.
    • With Role hierarchy, the manager role gets record level access for all his below user roles.


6. What is a Permission Set?

  • Permission Sets are add-ons to Profiles. 
  • They generally have the same settings and are used to increase users’ permissions above what the Profile provides. The benefit to them is that you can give users slightly different permissions without having to create separate Profiles.
  • They reduce the overhead for Administrators in that way.
  •  It’s useful to think of Profiles as the base set of permissions that many users have in common while Permission Sets are the “extra” permissions that fewer users need.
  • A permission set is similar to a profile as it is also used to provide permissions to users. If you want to give any specific permission to few users with the same profile, then you can use the permission set. A permission set is used to extend the permission for particular users with the same profile.


7. What is an object?

  • An object is represented as a database table that stores organization data. 
  • Objects consist of a set of fields and we store data against that field. To view data Salesforce provided  TABS.
  • To create custom fields go to 
    • Setup=>Build=>Create=>Object.


8. What is the Formula field?

  • Formula Field is a read-only field that derives its values for the formula Expression you define.
  • We cannot Edit Formula Field.
  • When the source field gets changed the Formula field changes automatically.


9. What is Validation rules?

  • The validation rule helps the user to improve the data quality by preventing the users from entering incorrect data. In simple words, we can say that the validation rule validates the user data.
  • Validation rules are used to validate the data based on the formula or criteria that a user provides. 
  • Before saving a record into the database, the validation rule checks whether the entered data is correct or not based on the user given criteria.
  • To create a validation rule, go to
    • Setup-> object-> click validation rule.


10. What is an Approval Process?

  • An Approval Process is for very specific automation use cases. 
  • Naturally, it’s used when something needs to be approved and tracks when and who approved or rejected something. 
  • It covers notifying approvers, locking the record from edits, conditional logic for who should approve, and varied approval models (for example, all approvers or any approvers.)


11. What is Process Builder?

  • Process Builder is a more advanced automation tool than Workflows. 
  • While still following the If This Happens, Then Do That concept, Process Builder allows Admin to control the order of actions as well as offering more actions such as creating records, posting to Chatter, and launching other automated tools.
  • Using process builder, you can perform various actions like,
  • Create a new record, Post to chatter, Update related record, call a flow, Call apex\ another process, submit for approval, Email alert, Quick action


12. What is a page layout?

  • At a high level a page layout controls which fields are visible for a specific record, but they control more than that. They can also control which fields or editable or are required. Additionally, page layouts control buttons, related lists, and some other elements too.
  • Page layout is a user interface customization. You can organize buttons, links, fields, related lists, visual force pages and quick actions etc., using page layout. 
  • To create a new page layout, go to,
    • Setup-> customize\create-> objects->select an object->pagelayout.
  • You can customize the contents of a page for different users using page layout.
  • By default, you can have only a one-page layout per profile, if you want to have more than a profile then you have to use record type. It provides different business processes, pick-list and page layouts for users.


13. What is Reports?

  • A report is a list of records that meet the criteria you define. It’s displayed in Salesforce in rows and columns and can be filtered, grouped, or displayed in a graphical chart.
  • Every report is stored in a folder. Folders can be public, hidden, or shared, and can be set to read-only or read/write. You control who has access to the contents of the folder based on roles, permissions, public groups, and license types. You can make a folder available to your entire organization, or make it private so that only the owner has access.
  • A report is a list of records displayed with certain criteria that users define. The records can be grouped, filtered and sorted based on requirements. 
  • To create a report we need to keep 5 things in mind.
    • Report Type – (template, simple object or related objects that you want to create a report).
    • Fields – fields in the objects you want to display in the report.
    • Filters – we have many filters like Field filter, cross filter, row limit, logic filter.
    • Format – Tabular, matrix, summary or joined format
    • Folder – after creating a report you can save it in a public folder or you can create a folder.


15. Types of Report?

We have 4 types of reports they are,

  • Tabular format
  • Matrix format
  • Summary format
  • Joined Format

Tabula Reports: 

  • A simple listing of data without any subtotals. This type of report provides you most basically to look your data. Use tabular reports when you want a simple list or a list of items with a grand total.
  • Example: This type of report is used to list all accounts, contacts, List of opportunities…..etc.….

Summary Reports: 

  • This type of report provides a listing of data with groupings and subtotals. Use summary reports when you want subtotals based on the value of a particular field or when you want to create a hierarchically grouped report, such as sales organized by year and then by quarter.
  • Example: All opportunities for your team sub totalled by Sales Stage and Owner.

Matrix Reports: 

  • This type of report allow you to group records both by row and by column. A comparison of related totals, with totals by both row and column. Use matrix reports when you want to see data by two different dimensions that aren’t related, such as date and product.
  • Example: Summarize opportunities by month vertically and by account horizontally.

Joined Reports: 

  • Blocks of related information in a single report. This type of report enables you to adopt five different blocks to display different types of related data. Each block can own unique columns, summary fields, formulas, filters and sort order. Use joined reports to the group and show data from multiple report types in different views.
  • Example: You can build a report to show opportunity, case and activity data for your accounts.


15. What is Dashboard?

  • The dashboard is the graphical representation of the data generated by a report or multiple reports. Dashboard component types can be charts, tables, gauges, metrics, or other components that you can create with VisualForce.
  • A Dashboard is the graphical portrayal of the information produced by a report or different reports. Dashboard part types can be graphs, tables, measures, measurements, or different segments that you can make with Visual Force.
  • The dashboard has two primary things, information source and segments
  • Information source is the report that you need to show graphically
  • Part is the kind of graphical portrayal like diagrams, tables and so on.
  • We can have the most extreme of 20 dashboards in a solitary dashboard board.


15. Order Of Execution

  • The original record is loaded from the database.
  • System Validation Rules.
  • Executes all before triggers.
  • Custom Validation rules.
  • Executes duplicate rules.
  • Saves the record to the database, but doesn’t commit yet.
  • Executes all after triggers.
  • Executes assignment rules.
  • Executes auto-response rules.
  • Executes workflow rules.
  • If there are workflow field updates, updates the record again.
  • If the record was updated with workflow field updates, fires before and after triggers one more time. Custom validation rules, duplicate rules, and escalation rules are not run again.
  • Executes processes and flows launched via processes and flow trigger workflow actions.
  • Executes escalation rules.
  • Executes entitlement rules.
  • If the record contains a roll-up summary field or is part of a cross-object workflow, perform calculations and updates the roll-up summary field in the parent record. The parent record goes through the save procedure.
  • If the parent record is updated, and a grandparent record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the grandparent record. Grandparent record goes through the save procedure.
  • Executes Criteria Based Sharing evaluation.
  • Commits all DML operations to the database.
  • Executes post-commit logic, such as sending an email.


Comments

Popular posts from this blog

Lightning Web Components Specialist Superbadge Solution Boat Tile Component

Lightning Web Components Specialist Superbadge Solution Boat Search Results Component

Lightning Web Components Specialist Superbadge Solution Boat Search Form Component