Developer Fundamentals Flashcards

1
Q

What is MVC?

A

Model,View,Controller

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Multi-tenant Environment?

A

Unique URL Endpoints
Governor Limits -
Data Retrieval
Data Creation
API Limits
Benefits - Economy of scale from shared services
Quick Turn around time
Industry standardization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Lightning Component Framework?

A

A UI framework by Salesforce for dynamic, responsive web apps on desktop and mobile devices.

  • Component-based development. - Event-driven communication. - Responsive design. - Built-in security.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the capabilities of the Lightning Component Framework?

A

Aura Components & Lightning Web Components.

The components built using the framework can be added as custom tabs on the navigation bar.
Uses JavaScript on the client-side and Apex on the Server side.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Component Based Development?

A

An approach where apps are built by combining reusable, independent components
- Faster development with component reuse. - Easier maintenance and collaboration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Lightning Web Components?

A

A modern UI framework for web apps using web standards like HTML, CSS, and JavaScript.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Global Access modifier?

A

The global access modifier indicates that this class is accessible outside of its namespace, making it available for use in other namespaces or packages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is example of Array in Apex?

A

Contact[] ContactList: This is a public property of the class, and it returns an array of Contact objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is example of Controller - getting return of records in Apex class?

A

global class ListofContactController {

global Contact[] ContactList{
    get{
        return [SELECT Id, Name  FROM Contact];
    }
}

}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is an example of calling a custom controller in visualforce?

A

<apex:page>
<apex:pageBlock>
<apex:pageBlockTable>
<apex:column></apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When should you use declarative customizations in Salesforce?

A

Declarative customizations should be used when possible for simple use cases that do not require complex logic or extensive data processing. They are ideal for scenarios where you can achieve the desired outcome using point-and-click tools like Process Builder, Flow Builder, Workflow Rules, Validation Rules, and Page Layouts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are some common use cases for declarative customizations?

A

Automatically assigning record ownership based on criteria. - Sending email notifications when certain conditions are met. - Enforcing data validation rules using Validation Rules. - Customizing the layout and fields on record detail pages with Page Layouts. - Creating simple calculations using Formula Fields.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the advantages of declarative customizations?

A

No coding skills required, making it accessible to non-developers. - Faster implementation and easier maintenance. - Built-in features for version control and auditing changes. - Typically fewer governor limit considerations compared to programmatic solutions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

When should you consider using programmatic customizations in Salesforce?

A

Programmatic customizations are necessary when you need to implement complex business logic, extensive data processing, or integrations that cannot be achieved using declarative tools alone. You should consider programmatic solutions when declarative tools cannot meet the specific requirements of your project.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are some common use cases for programmatic customizations?

A

Complex data transformations and data migrations. - Integrating Salesforce with external systems using APIs. - Implementing custom algorithms or business processes that require conditional logic. - Extensive data manipulation or calculations beyond the capabilities of Formula Fields. - Implementing custom user interfaces or web applications using Visualforce or Lightning components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the advantages of programmatic customizations?

A

Greater flexibility and control over business processes. - Ability to handle complex logic and integrations. - Custom user interface development with Visualforce or Lightning components. - Extensibility and customization of Salesforce beyond the capabilities of declarative tools.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are governor limits in Salesforce, and how do they relate to programmatic customizations?

A

Governor limits are runtime constraints imposed by Salesforce to ensure the efficient use of system resources and to prevent monopolization of shared resources. Programmatic customizations, such as Apex code and triggers, need to be designed with these limits in mind. Developers must ensure that their code operates within these limits to avoid performance issues and potential exceptions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

When is it appropriate to use formula fields in Salesforce?

A

Formula fields are appropriate for scenarios where you need to calculate values based on data from the same record or related records and display the result in a field. They are useful for simple calculations, such as computing a total amount or determining a record’s status based on certain criteria. Formula fields are an excellent choice when the logic can be expressed using formula functions and does not require extensive processing or external data sources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are best practices for using formula fields effectively?

A
  • Keep formula fields simple and avoid complex logic. - Minimize the use of cross-object formula fields to avoid performance issues. - Leverage formula functions and operators for efficient calculations. - Test formula fields thoroughly to ensure they produce the expected results. - Document formula logic and field descriptions for clarity.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

In what scenarios should you consider using roll-up summaries in Salesforce?

A

Roll-up summaries are valuable when you need to calculate and display aggregated data from related records, such as counting the number of related child records or summing up a specific field’s values from child records. They are most effective when dealing with parent-child relationships in Salesforce objects like Accounts and Contacts or Opportunities and Products. Roll-up summaries simplify reporting and provide real-time visibility into data without the need for custom code or complex queries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What are best practices for using roll-up summaries efficiently?

A

Identify the appropriate parent-child relationships for roll-up summaries. - Configure the roll-up summary field to perform the desired aggregation, such as COUNT, SUM, or AVG. - Consider using filtering criteria to refine the set of child records to include in the calculation. - Regularly review and maintain roll-up summaries, especially when data models change. - Be mindful of governor limits, as roll-up summaries consume limits when recalculating data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

When designing a data model in Salesforce, what factors should be considered?

A

When designing a data model, consider: - The nature of the business processes being modeled. - The relationships between different data entities. - Data volume and scalability requirements. - Reporting and analytics needs. - Integration requirements with external systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is an object in Salesforce, and how does it relate to data modeling?

A

In Salesforce, an object is a database table that stores specific types of data, such as Accounts, Contacts, or Custom Objects. Objects are used to model and organize data within the application. When designing a data model, you determine which standard and custom objects are needed to represent different data entities and their relationships.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

When should you create custom objects in Salesforce, and how are they defined?

A

Custom objects should be created when standard objects do not adequately represent the required data entities or when additional fields and functionality are needed. Custom objects are defined by specifying their name, label, plural label, and other attributes. You can also create custom fields on these objects to capture specific data.

25
Q

How do you define fields on Salesforce objects, and what types of fields are available?

A

Fields on Salesforce objects are defined by specifying their data type, label, and other attributes. Available field types include text, number, date/time, picklist, formula, and more. Field types determine the kind of data that can be stored in a field. For example, a text field can store alphanumeric characters, while a date/time field stores date and time values. When designing a data model, choose appropriate field types based on the nature of the data being captured.

26
Q

What are relationships between objects in Salesforce, and when should they be used?

A

Relationships define how objects are related to each other. In Salesforce, you can create relationships like Master-Detail, Lookup, and External Lookup to establish connections between objects. Relationships should be used when there is a need to link one object’s data to another, enabling you to access and display related data efficiently. For example, you might create a Lookup relationship between a Custom Object and the Contact standard object to associate custom records with specific contacts.

27
Q

What is an external ID, and when should you use it in a data model?

A

An external ID is a custom field on an object that contains unique identifiers from an external system. It is used when you need to integrate Salesforce with an external system and want to establish relationships between records in Salesforce and records in the external system using a common identifier. External IDs help ensure data consistency and accuracy when syncing data between systems. They are commonly used in scenarios like integrating Salesforce with an ERP system or syncing customer data from an external database.

28
Q

How can you access and query data in Salesforce using the data model you’ve designed?

A

You can access and query data in Salesforce using various methods, including: - SOQL (Salesforce Object Query Language) queries: For retrieving specific records and related data. - Apex code: For programmatic data manipulation and custom business logic. - Reports and Dashboards: For creating visual representations of data. - REST and SOAP APIs: For integrating with external systems. - Custom Lightning components and Visualforce pages: For building custom user interfaces to interact with data. Depending on your requirements, you can choose the most appropriate method to work with the data model you’ve designed.

29
Q

What considerations should be kept in mind when dealing with large data volumes in Salesforce?

A

When dealing with large data volumes, consider: - Indexing fields used in filters and WHERE clauses to improve query performance. - Using selective filters to reduce the number of records retrieved. - Implementing data archiving and retention policies to manage data growth. - Bulk data load strategies to handle data imports and exports efficiently. - Leveraging features like Big Objects or external storage for handling extremely large datasets. Planning for data scalability is crucial to maintain system performance in Salesforce.

30
Q

What are the primary methods for importing and exporting data in Salesforce development environments?

A

The primary methods for importing and exporting data in Salesforce development environments include: - Data Import Wizard: A user-friendly web-based tool for importing data in small to medium volumes. - Data Loader: A desktop application for bulk data operations, suitable for larger data volumes. - Salesforce API: REST and SOAP APIs provide programmatic access for data integration and migration. - Data Export: Scheduled backups of data can be downloaded from Salesforce. - Data Transfer Objects (DTOs): Custom Apex code can be written to import and export data using DTOs.

31
Q

When is it appropriate to use the Data Import Wizard?

A

The Data Import Wizard is appropriate for small to medium-sized data volumes and is suitable for users who are not familiar with coding. It’s commonly used for one-time data imports, lead or contact imports, and basic data migrations.

32
Q

What considerations should be kept in mind when using the Data Import Wizard?

A

Considerations when using the Data Import Wizard include: - Data volume limits: Ensure the data volume doesn’t exceed the tool’s capacity. - Data format: Prepare data in a compatible format (CSV or Excel) before importing. - Record ownership: Specify the owner for imported records. - Field mapping: Map source fields to Salesforce fields accurately. - Validation rules: Ensure data meets validation criteria defined in Salesforce.

33
Q

When is Data Loader a preferred choice for data import and export tasks?

A

Data Loader is preferred for larger data volumes, complex data transformations, and when automation is needed. It’s a command-line tool suitable for bulk operations and scheduled data loads. Data Loader also provides more control over the import and export process, making it a good choice for developers and administrators.

34
Q

What are some best practices when using Data Loader for data migration?

A

Best practices with Data Loader include: - Testing in a sandbox: Always test data loads in a sandbox environment before executing in production. - Data mapping: Ensure accurate field mapping between source and target fields. - CSV format: Use CSV files with headers for structured data. - Batch size: Adjust batch sizes to optimize performance. - Error handling: Monitor and address any data import errors promptly.

35
Q

How can Salesforce APIs be used for data integration and migration tasks?

A

Salesforce APIs, including REST and SOAP, provide programmatic access for data integration and migration. They are suitable for real-time data synchronization, integration with external systems, and automation of data transfer tasks. Developers can write custom code to interact with these APIs to import and export data. Considerations include API limits, authentication, and security when using Salesforce APIs for data operations.

36
Q

What options are available for scheduled data exports in Salesforce?

A

Salesforce provides options for scheduled data exports, such as: - Weekly Data Export: Automated weekly backups of your data. - Data Export Service: Scheduled exports to a secure FTP server. - Salesforce Connect: Real-time access to external data sources without manual imports. - Custom scripts: Use Apex, Heroku, or third-party tools to schedule data exports and integrations as needed.

37
Q

When is it appropriate to use custom Apex code or Data Transfer Objects (DTOs) for data import and export?

A

Custom Apex code and DTOs are suitable when you need highly customized data transformation, complex logic, or real-time integration. These options offer maximum flexibility but require development expertise. Use custom code when out-of-the-box tools cannot meet your specific requirements or when you need to perform extensive data manipulation during the import or export process.

38
Q

What considerations should be taken into account when using custom Apex code or DTOs for data operations?

A

Considerations for custom Apex code and DTOs include: - Code maintainability: Ensure code is well-documented and follows best practices. - API limits: Be mindful of governor limits to avoid performance issues. - Bulk processing: Implement efficient batch processing for large datasets. - Error handling: Plan for error detection and logging to troubleshoot issues. - Version control: Maintain code versioning for future enhancements and updates.

39
Q

What is Visualforce in Salesforce?

A

Visualforce is a framework in Salesforce for building custom user interfaces and web applications. It allows developers to create dynamic and interactive pages using a combination of HTML, Apex code, and Visualforce components.

40
Q

What is the purpose of Visualforce methods?

A

Visualforce methods are used to define custom actions and behavior in Visualforce pages. They allow developers to perform server-side operations, manipulate data, and control the flow of the page. Visualforce methods are written in Apex and can be invoked from Visualforce pages to handle user interactions and perform business logic.

41
Q

How are Visualforce methods declared and defined?

A

Visualforce methods are declared within the <apex:page> component using the apex:page attribute controller to specify the Apex class that contains the methods. These methods are defined in the Apex class and marked as public or global to make them accessible from Visualforce pages.</apex:page>

42
Q

What is the syntax for calling a Visualforce method in a page?

A

To call a Visualforce method in a page, you use the {!} expression syntax followed by the method name, like {!methodName}. This allows you to invoke the method and display its result or perform actions when an event occurs, such as a button click or page load.

43
Q

What are some common use cases for Visualforce methods?

A

Visualforce methods are used for a variety of purposes, including: - Executing custom data queries and retrieving records. - Performing data validation and enforcing business rules. - Handling user input and form submissions. - Triggering server-side actions like record creation or updates. - Controlling the page’s navigation and redirection. - Dynamically generating and rendering content based on data or user interactions.

44
Q

How can Visualforce methods handle errors and exceptions?

A

Visualforce methods can use exception handling techniques in Apex, such as try-catch blocks, to catch and handle errors gracefully. When an exception occurs, you can display a custom error message or redirect users to an error page. Proper error handling ensures a better user experience and helps troubleshoot issues effectively.

45
Q

What is the difference between a getter and an action method in Visualforce?

A

Getter methods are used to retrieve data from the controller and display it on the Visualforce page. They are read-only methods and do not perform data updates. - Action methods, on the other hand, are used to execute server-side actions or perform updates based on user interactions. They can be used to submit forms, save records, or trigger other server-side operations. Action methods can modify data and perform both read and write operations.

46
Q

How can Visualforce methods interact with JavaScript on the client side?

A

Visualforce methods can be used in conjunction with JavaScript to create dynamic and responsive user interfaces. You can use JavaScript to call Visualforce methods asynchronously, update page elements based on method results, or handle client-side events. This combination of Visualforce and JavaScript allows for a rich user experience and real-time interactions.

47
Q

What is the relationship between Visualforce pages and controllers?

A

Visualforce pages are associated with controllers that define the behavior and logic of the page. A Visualforce page can have a single controller or multiple controllers, allowing for modular and reusable code. The controller is responsible for handling data interactions, method calls, and providing data to the page for rendering. Visualforce pages and controllers work together to create a complete user interface.

48
Q

What are some best practices for working with Visualforce methods?

A

Best practices for Visualforce methods include: - Keep logic in the controller: Place most of the business logic in the controller to separate concerns and maintain a clean presentation layer. - Use efficient queries: Optimize data queries to minimize database access and improve page performance. - Follow naming conventions: Use meaningful names for methods to enhance code readability. - Implement proper error handling: Handle exceptions gracefully and provide user-friendly error messages. - Test thoroughly: Perform unit testing and validation to ensure method behavior is as expected. - Document code: Maintain documentation for methods and their purpose to aid in future maintenance.

49
Q

What is example of Getter Method in Visualforce?

A

VF - <apex:page>
<apex:outputText></apex:outputText>
</apex:page>

Apex Class:

public class MyController {
public String messageFromController {
get {
// This is a getter method.
// It returns a message that will be displayed on the Visualforce page.
return ‘Hello from the controller!’;
}
}
}

50
Q

How Can a Developer check user has read access to a field if the field is display on Visual-force page?

A

Call the isAccessible() method of Schema.DescribeFieldResult to verify field level read permission.

51
Q

What are examples of Apex Runtime Engine enforcing the governor limits?

A

Total Number of records retrieved by SOQL queries
Time executing a SOQL query
CPU time per transaction.

52
Q

What is an External Lookup?

A

Can be used to link a child’s external object to a parent standard or custom object.

53
Q

What is an Indirect Lookup?

A

links a child standard,custom, or external object to a parent external object.

54
Q

What following events are fired when an Aura Component loads on a page?

A

The ‘init’ event signal that a component initialization is complete. The render event trigger the start of component rendering. The after render event signals that the rendering is complete.

55
Q

How can I get the sObject type that similar to another object?

A

getSObjectType()
getSObjectType() method is used to retrieve the sObject type of a record. It is a method available on the SObject class, which is the base class for all standard and custom objects in Salesforce.

56
Q

What is Dynamic SOQL?

A

refers to the capability to construct and execute SOQL queries dynamically at runtime. This means that you can build and modify the query string based on various conditions or user input rather than writing a fixed, static query in your code. Dynamic SOQL allows you to create more flexible and adaptable queries.

57
Q

Triggers and order of Execution

A

System Validation Rules:

Verify that required fields have values.
Run any system validation rules.
Before Triggers:

Execute any ‘before’ triggers.
Custom Validation Rules:

Run any custom validation rules.
Record Type-specific Validation Rules:

Execute validation rules specific to the record type.
Duplicate Rules:

Check for duplicate records.
After Triggers:

Execute any ‘after’ triggers.
Assignment Rules:

Run assignment rules.
Auto-Response Rules:

If the record meets criteria defined in an auto-response rule, send an auto-response email.
Workflow Rules:

Evaluate workflow rules.
Before and After Update Flows:

Execute any ‘before’ or ‘after’ update flows.
Processes:

Execute processes.
Roll-up Summary Fields:

Update any parent roll-up summary fields.
Criteria-based Sharing Rules:

Apply any criteria-based sharing rules.
System Post-Commit Logic:

Perform system post-commit logic, such as sending email.
Post-Commit Flows:

Execute any post-commit flows.

58
Q
A