This project is intended to show the possibilities of Mashmatrix Sheet using its open APIs.
There are examples that uses following APIs:
- Check out the latest source code of this repository
- Install Salesforce CLI
- Connect to Salesforce DevHub org to create new scratch orgs
- Create a scratch org to setup integration examples.
$ sfdx force:org:create -f config/project-scratch-def.json -a msmx-sheet-integration -w 10
- Install Mashmatrix Sheet trial package from command line.
$ sfdx force:package:install --package 04tIT0000013Pp3YAE -u msmx-sheet-integration -w 10
- Assign required permission sets to the scratch org's default user.
$ sfdx force:user:permset:assign --permsetname msmxSheet__MashmatrixSheetUser -u msmx-sheet-integration
$ sfdx force:user:permset:assign --permsetname msmxSheet__MashmatrixSheetAdministrator -u msmx-sheet-integration
- Push this example repository's source code to the scratch org.
$ sfdx force:source:push -u msmx-sheet-integration
- Assign a permission set to access example components.
$ sfdx force:user:permset:assign --permsetname Mashmatrix_Sheet_Integration_Examples -u msmx-sheet-integration
- Load example data using SFDX migration automatic plugin
$ sfdx plugins:install sfdx-migration-automatic
$ sfdx automig:load --inputdir data/records -u msmx-sheet-integration
$ sfdx automig:load --inputdir data/books -u msmx-sheet-integration
- Open Mashmatrix Sheet to confirm the loaded books/records are accessible.
$ sfdx force:org:open -u msmx-sheet-integration -p /lightning/n/msmxSheet__MashmatrixSheet
-
Confim IDs of the books listed in left sidebar (from book setting menu), and memo them with their name.
-
Open "Mashmatrix Sheet Integration Examples" app from app launcher.
-
Focus on "Map Integration" tab, open "Edit Page" from right top menu.
-
Select "Account Search" component, replace "Book ID" value to the memoed book ID of "Account/Contact" book in step 8. So to "Account Map" and "Contact in Selected Account" components.
-
Focus on "Filter Control Integration" tab, open "Edit Page" from right top menu.
-
Select "Accommodations Result" component, replace "Book ID" value to the copied book Id of "Accommodation" book in step 8.
-
Focus on "Message Debug" tab, open "Edit Page" from right top menu.
-
Select "Mashmatrix Sheet" component in the left pane, replace "Book ID" value to the copied book Id of "Book for Event/Message Debug"
-
Focus on "Custom Event" tab, open "Edit Page" from right top menu.
-
Select "Mashmatrix Sheet" component in left pane, replace "Book ID" value to the copied book Id of "Custom Event" book in step 8.
On "Map Integration" tab, there are two Mashmatrix Sheet components and one custom map component in the page.
The "Account Search" sheet component located in left pane queries account records in the organization, filtering by state or account type.
The map component receives message of loadComplete
with the searched result, then plots them on the map.
If the user clicks a plotted account entry, it publishes setParameters
message with its account ID.
The "Contacts in Selected Account" sheet component, located in the right-bottom of the page, is referring the accountId parameter in its filter,
so it will list all contact records belonging to selected account.
On "Filter Condition Integration" tab, there are two components in the page.
One is the custom control component, which publishes setParameters
message according to the control input by the user.
Another is a Mashmatrix Sheet component that lists accomodations data in the org, which references parameter values in its filters.
By changing the control input in the control component, the sheet component will be automatically refreshed to list the records matching with the inputted conditions.
To reference parameter values in filters, please check the ”Reference Value" page in user guide.
On "Message Debug" tab, it shows one sheet component and two custom components. The "Debug Messages" component lists all messages published to message channels, and events published to platform events of Mashmatrix Sheet in real time. The "Publish Messages" component can create raw messages to publish to message channels by specifying message payload in JSON in the textarea.
On the "Custom Event" tab, it shows one sheet component and two custom components. The "Custom Event on Action Button" component will receive a custom event named "calcSum" after clicking the "Sum" button to perform the sum of the "Price per Day", "Bathrooms" and "Bedrooms" columns of the currently selected records. The "Custom Event on Action Link" component will receive a custom event named "accommodationDetail" when the "Accommodation Name" is clicked. It will then display the detailed information of the accommodation.