Accelerator Order History LWC - Source
Installation
The following steps describe how to install the order history 'Light Web Component' into the required Salesforce Organization.
Before installing, make sure you have the proper access credentials to perform the installation.
- Perform the below steps after deploying the LWC component and importing the Apex class as mentioned in the configuration section.
- Click setup and then search for Custom Settings. Navigate to the Custom Settings page and click 'OrderHistoryAPI' manage action.
- Click New. Create a new API url configuration by adding the following URL into the Order History API Endpoint text box and click save.
- Replace the API hostname with the appropriate Mule Runtime environment and add the URL to the textbox.
- From the setup page, navigate to Security > CSP Trusted Sites and then add the hostname of the API.
- Create a new CSP Trusted Site and enter the details with the respective hostname and then click Save. This enables the LWC datatable component to access the Order History Mule API deployed in CloudHub through an AJAX call from the browser.
- Navigate to the 'Contacts Record' page by clicking the app launcher.
- Click the 'Edit Page' option.
- From the left pane, add the 'fetchorder' custom component to the required layout.
Note: The domain must be configured so that the custom component installed can be listed. The following screenshot shows the component added to the layout: - Once added, click Save and Activate.
To verify the setup, navigate to the contact record page and view the order history data from the table.