A collection of code examples for Lightning Web Components using FactSet's APIs. FactSet offers powerful APIs to help integrate your financial data needs within your applications, web portals and statistical packages.
More information on FactSet's API can be found here.
This is a list of tools that you will require for using and developing the recipes:
-
Set up your environment. Follow the steps in the Quick Start: Lightning Web Components Trailhead project. The steps include:
- Enable Dev Hub in your Trailhead Playground
- Install Salesforce CLI
- Install Visual Studio Code
- Install the Visual Studio Code Salesforce extensions, including the Lightning Web Components extension
-
If you haven't already done so, authenticate with your hub org and provide it with an alias (myhuborg in the command below):
sfdx force:auth:web:login -d -a myhuborg
-
Clone the factset-api-demo repository:
git clone https://github.com/factset/factset-api-salesforce-recipes cd factset-api-salesforce-recipes
-
Create a Developer API Key by following the instructions here.
-
Replace
<MY-API-KEY>
in the fileforce-app\main\default\classes\signals\FetchSignals.cls
with the newly generated API Key. -
Create a scratch org and provide it with an alias (factset-api-salesforce-recipes in the command below):
sfdx force:org:create -s -f config/project-scratch-def.json -a factset-api-salesforce-recipes
-
Push the app to your scratch org:
sfdx force:source:push
-
Open the scratch org:
sfdx force:org:open
-
Go to
Setup -> Security -> Remote Site Settings
and add the endpointhttps://api.factset.com
. -
Next, follow How to add the components section
-
In App Launcher, click View All then select the Sales app. This will load the Home page.
-
In Setup, click on Edit Page.
-
In the Components list, under Custom, drag the
signalsRecentAccounts
component onto the page. -
Click
Save
. -
Make sure to have some accounts created in order for the Signals to be fetched.
Accounts need to have the Ticker Symbol
filled with a valid stock ticker
-
In App Launcher, click View All then select the Sales app. This will load the Home page.
-
Navigate to Accounts tab and click on one of the account.
-
In Setup, click on Edit Page.
-
In the Components list, under Custom, drag the
signalsAccount
orsignalsAccountTable
component onto the page.signalsAccount
is a Lightning Web Component that uses the lightning-accordion component to display the datasignalsAccountTable
is a Lightning Component that uses the lightning-datatable component to display the data
-
Click
Save
.
The account needs to have the Ticker Symbol
filled with a valid stock ticker
- In App Launcher, select the LWC app.
This repository contains several files that are relevant if you want to integrate modern web development tooling to your FactSet API Recipes development processes, or to your continuous integration/continuous deployment processes.
Prettier is a code formatter used to ensure consistent formatting across your code base. To use Prettier with Visual Studio Code, install this extension from the Visual Studio Code Marketplace. The .prettierignore and .prettierrc files are provided as part of this repository to control the behavior of the Prettier formatter.
ESLint is a popular JavaScript linting tool used to identify stylistic errors and erroneous constructs. To use ESLint with Visual Studio Code, install this extension from the Visual Studio Code Marketplace. The .eslintignore file is provided as part of this repository to exclude specific files from the linting process in the context of Lightning Web Components development.