Professional Documents
Culture Documents
Salesforce
Salesforce
Salesforce
How do you create a custom Lightning component in Salesforce, and what are some
considerations to keep in mind?
Considerations: -
Security – Validate the user input, CRUD and filed level security permissions.
Performance – use asynchronous actions for long running operations to prevent blocking the user
interface
Reusability -
Accessibility - Follow WCAG (Web Content Accessibility Guidelines) standards and leverage
Salesforce's built-in accessibility features.
Lightning Design System - Utilize the Salesforce Lightning Design System (SLDS) to maintain a
consistent and professional look and feel with other Salesforce components. Adhere to SLDS
guidelines for styling and user experience
Testing and Error Handling –
-----------------------------------------------------------------------------------------------------------------------------------
2. How do you use Apex code to interact with the Salesforce database, and what are some best
practices for database access?
Define Apex class or trigger, querying data, modifying data (like insert, update, delete).
To use Apex code to interact with the Salesforce database, can perform various operations like
querying, inserting, updating, and deleting records.
Best Practices: -
Avoid Writing SOQL Queries or DML Operations Inside the Loop Statements. ...
Write a Single Trigger per sObject Type. ...
Always Bulkify Your Code. ...
Avoid Nested Loops. ...
Avoid Hardcoding IDs.
-----------------------------------------------------------------------------------------------------------------------------------
3. how to create and use Apex classes and triggers in a Salesforce application?
-----------------------------------------------------------------------------------------------------------------------------------
5. How do you use Visualforce to create custom pages and forms in Salesforce, and what are some
best practices for Visualforce development?
Create VF custom page: - From Setup, enter Visualforce Pages in the Quick Find box, then select
Visualforce Pages. Click New. In the Name text box, enter the text that should appear in the URL as
the page name. This name can contain only underscores and alphanumeric characters, and must be
unique in your org.
-----------------------------------------------------------------------------------------------------------------------------------
9.How do you implement testing and debugging in Salesforce, and what are some best practices
for testing and debugging?
Switch on Debug Logs( time limit will be 24h), in the code system.debug.
1. Package Creation:
a. In your Salesforce org, go to Setup by clicking on the gear icon in the top-right
corner.
b. In the Quick Find box, type "Package Manager" and select the "Package Manager"
option.
c. Click the "New" button to create a new package.
d. Provide a name, description, and version number for your package.
e. Choose the package type: Unlocked or Managed. Unlocked packages are
recommended for most use cases as they offer more flexibility and easier upgrades.
f. Select the components you want to include in the package, such as custom objects,
fields, Apex classes, Visualforce pages, Lightning components, etc.
g. Specify any dependencies on other packages, if applicable.
h. Review and confirm the package details.
i. Save the package.
-----------------------------------------------------------------------------------------------------------------------------------
10.How do you optimize SOQL queries for performance in a Salesforce application?
--------------------------------------------------------------------------------------------------------------------------------------
Best practices:-
Send error logs to an external service. ...
Use error objects in rules. ...
Use meaningful error code descriptions. ...
Exception handling. ...
Avoid uninitialized objects in rules. ...