LWC component based on the default Salesforce Activity Timeline, but extended to work with any Salesforce object.
You can easily configure which objects to be visible in a timeline, and you can even specify which Salesforce app the configuration is intended for.
Parent Config | Child Config |
---|---|
You'll need to create a push topic for every SObject. Specify the push topic name in the Child Config. Create a push topic by running the following code (must also be done in production):
String sobjectName = 'SOBJECT';
insert new PushTopic(Name = 'TIMELINE_' + sobjectName, Query = 'SELECT Id FROM ' + sobjectName, NotifyForOperationCreate = true, NotifyForFields = 'All', ApiVersion = 52.0);
- The Expanded Fields To Display feature does not support all objects. See the User Interface API documentation for a list of supported objects. https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_list_view_supported_objects.
To add a custom view for a child object:
- Create a Controller class and Custom component
- Update timelineCustomView component to show your custom component conditionaly
- Mark 'Custom View' checkbox in your Timeline Child Config.
- Install npm
- Install Salesforce DX CLI
- Alternative:
npm install sfdx-cli --global
- Alternative:
- Clone this repository (GitHub Desktop is recommended for non-developers)
- Run
npm install
from the project root folder - Install SSDX
- Non-developers may stop after this step
- Install VS Code (recommended)
- Install Salesforce Extension Pack
- Install recommended plugins! A notification should appear when opening VS Code. It will prompt you to install recommended plugins.
- Install AdoptOpenJDK (only version 8 or 11)
- Open VS Code settings and search for
salesforcedx-vscode-apex
- Under
Java Home
, add the following:- macOS:
/Library/Java/JavaVirtualMachines/adoptopenjdk-[VERSION_NUMBER].jdk/Contents/Home
- Windows:
C:\\Program Files\\AdoptOpenJDK\\jdk-[VERSION_NUMBER]-hotspot
- macOS:
To build locally without using SSDX, do the following:
- If you haven't authenticated a DX user to production / DevHub, run
sfdx auth:web:login -d -a production
and log in- Ask
#crm-platform-team
on Slack if you don't have a user - If you change from one repo to another, you can change the default DevHub username in
.sfdx/sfdx-config.json
, but you can also just run the command above
- Ask
- Create a scratch org, install dependencies and push metadata:
sfdx force:org:create -f ./config/project-scratch-def.json --setalias scratch_org --durationdays 1 --setdefaultusername
echo y | sfdx plugins:install [email protected]
keys="" && for p in $(sfdx force:package:list --json | jq '.result | .[].Name' -r); do keys+=$p":{key} "; done
sfdx sfpowerkit:package:dependencies:install -u scratch_org -r -a -w 60 -k ${keys}
sfdx force:source:push
sfdx force:org:open
Questions? Ask on #crm-platform-team on Slack.