Account data submitted in Salesforce → Sent to External API → Account created in the external system → External System ID stored in Salesforce.
Friday, 21 February 2025
Monday, 3 February 2025
How to Debug: Console, HRA, and Apex Debug Logs Salesforce
Explanation of Log Content:
Console.log:
Used for frontend debugging in JavaScript or Lightning Web Components (LWC).
Logs messages, variables, and errors to the browser console.
HRA.log:
A custom log file for a Human Resources Application.
Tracks application events, warnings, and errors for auditing and debugging purposes.
Apexdebug.log:
Generated by Salesforce for debugging Apex code.
Captures execution details, SOQL queries, debug statements, and exceptions.
These logs are essential for troubleshooting, monitoring, and improving applications. The content and structure will vary depending on the specific use case and the system being debugged.
Understanding Logs: Console.log, HRA.log, and Apex Debug.log
Subscribe to:
Posts (Atom)
1. User Submits Account Form
The user enters Name, Email, and Phone in a Lightning Web Component (LWC).
Clicking Submit triggers a call to an Apex method (sendAccountData).
2. Data Sent to External API
The Apex method sends account details to an external system via an API request.
The external system creates a new account and returns a unique External System ID.
3. Account Created in Salesforce
A new Account record is inserted in Salesforce.
The response from the external system is processed:
If an id is received, it is stored in the External_Id__c field on the Salesforce Account.
If no ID is returned, an appropriate message is stored.
4. Two-Way Synchronization Achieved
Salesforce and the external system are now linked via the External System ID.
Future updates can be synchronized based on this ID for real-time integration.