LWC Data Viewer

Viewing GRAX Data Within Salesforce

The GRAX Lightning Data Viewer allows you to expose GRAX data as related list components inside Salesforce, regardless of backup/archive status. This helps provide end users with the look and feel they are accustomed to, even when data doesn't exist in Salesforce anymore.

Setup Steps

Performance Concerns

it's required that you place the GRAX List Records components onto a separate lightning tab. This ensures the component only gets loaded when a user requires. Per Salesforce best practices, a user would click into a lightning tab on the page in order to load the lists on demand and thus prevent excessive Salesforce and GRAX call-outs.

Here are the steps a Salesforce/GRAX administrator needs to complete to successfully set up this LWC:

  1. First ensure all relevant data is backed up and/or archived so that it's available in GRAX. This includes related parents, children, and any other objects that you would like to expose within Salesforce and GRAX. Maintaining an incremental backup of all objects is a key first step when getting started with GRAX.

  2. Once your data is backed up, you can begin adding one or more lists using Salesforce's lightning app builder. Search for the GRAX List Records components in the left sidebar and drag it onto the page. You can repeat this process for each related object that you would like on the page.

    Screen Shot 2021-12-27 at 2.41.00 PM.png
    Per best practices, we've created a new GRAX Lightning Data Viewer tab and dragged the GRAX List Records components into that tab.

  3. For each component, you may notice various configuration options in the right sidebar. Let's take a look at each in detail:

    Configurable Options

    Configuration OptionDescription
    Related ObjectEnter the exact, case-sensitive API name of the object.
    Related Objects FieldsEnter the exact, case-sensitive API names of each field that you would like added as a column for the component. Use commas to separate the field names (no spaces).
    Override TitleAdd your own custom title to the component so that end users have a clear understanding of what's being shown.
    Data Set SelectionAll Data shows all related data that is in GRAX. Archived Data shows only records that were successfully archived using GRAX. Deleted Data shows only records that were deleted in Salesforce, not by GRAX.
    Use iFrameEnables a richer, more customizable embedded experience powered by the GRAX webapp.
    Records Per PageThe number of records you would like displayed for each page of the component. GRAX defaults to 5 to limit scrolling and for general ease of viewing.
    Set Component VisibilityThis is a standard Salesforce feature for lightning components. it's a very powerful feature that can allow you to control who can see this component, based on field values, profiles, permission sets, custom permissions, etc.
    Hide ID FieldRemoves the ID column from the output table, freeing up space for other fields if more important.
    Hide Show RecordRemoves the "Show Record" option from the record drop-down.
    Hide Show in GRAXRemoves the "Show in GRAX" option from drop-downs, which links into the GRAX webapp.
    Hide View GraphRemoves the "View Graph" option from drop-downs, which links into the GRAX webapp.
    Hide Restore ButtonRemoves the "Restore" option from drop-downs, which allows users to restore single records.
    don't Enable Security or Object DeletedDisables field-level-security checks, allowing all users to see all fields. Also enables viewing of deleted objects.
    Child LevelWhen the same object shows up in different levels of the hierarchy, this allows you to pick which one to show. 1 shows only immediate children of the record, 2 shows only grandchildren, and so forth.

How it Works

Let's look at a sample Account in Salesforce and see what the end user experience feels like. First, click into the tab we've set up that houses multiple GRAX lightning data viewer components. This account record as well as all children must exist in GRAX in order for the components to display data correctly.

  • You can sort any column in ascending or descending order by clicking the column name
  • You can resize the column widths (note the resized columns reset again upon page refresh)
  • ID fields show as hyperlinked and take the user to the relevant GRAX detail page
  • Click the dropdown on any row to reveal the View in GRAX option, which also directs the user to the GRAX detail page for that record
  • For ContentVersion and Attachment objects, an additional dropdown option titled Download File appears
  • You can click through multiple pages of data as needed

Screen Shot 2022-03-15 at 9.15.22 AM.png
Customize your lightning data viewer lists to show exactly what you need to expose. Use the dynamic ID hyperlinks, View Record, View in GRAX, or View Graph buttons to navigate.

Screen Shot 2022-03-15 at 9.16.30 AM.png
View Record allows you to quickly restore the record, access direct in GRAX, or view the parent.

Screen Shot 2022-01-03 at 10.13.07 AM.png
Using the quick links in the Salesforce lightning data viewer components, allow your users to be directed to GRAX record pages to easily navigate the full record details, versions, the related records via the hierarchy graph. Users can use the View in Salesforce button to further view that record back in Salesforce, if it still exists.

Default Columns

The table below summarizes the default fields that are added when configuring a component. You can adjust and customize as needed.

API NameLabelDescription
IDIDThe record ID always appears as the first column by default, so you don't need to add it as a column
LastModifiedDateLast Modified DateStandard Salesforce audit field
CreatedDateCreated DateStandard Salesforce audit field
IsDeletedDeletedGRAX system field that reflects whether GRAX has captured this record as manually deleted in Salesforce or deleted via GRAX archive. Read about the Delete Source field below which further clarifies how the record was deleted. Note this isn't to be confused with the standard Salesforce IsDeleted field, which represents the deleted state of a record in Salesforce at the time of a backup. This standard Salesforce field cannot be altered, and thus after GRAX backs up records and then captures them as deleted, we use GRAX system fields to represent deleted information.
GRAX_deletedAtDeleted AtThe date GRAX captured this record as deleted. Note this doesn't necessarily reflect the exact time the record was deleted, but rather when GRAX was able to capture and flag that it was deleted.
GRAX_deleteSourceDeleted SourceA Deleted Source of grax indicates this record was captured as deleted via a GRAX archive job. A Deleted Source of salesforce indicates this record was captured as deleted via GRAX Delete Tracking.

Permissions

By default, only users who have at least one GRAX permission set are able to view this component. As explained above, you can use Salesforce out-of-box component visibility to further define your own custom permissions for each component if you wanted to lock things down even more.

Users trying to further navigate within GRAX and see things such as the full record details along with the entire hierarchy within GRAX need the proper GRAX permissions as explained here.

Security Notice

The component makes a call to the GRAX API via Salesforce, so self-managed customers need to make sure all relevant Salesforce IPs are allowed through. For more on GRAX networking considerations, read the Networking guide.


Not Appearing?

If a user cannot see the LWC even after being granted a GRAX permission set, ensure that this user has access to the LWCHelper Apex class. You can do this via profiles or permission sets.

Salesforce Sharing and Security

This component respects Salesforce's sharing settings for any records that are still live in Salesforce. If you are viewing archived or deleted data that no longer exists in Salesforce, users can view the records in the component since it doesn't exist in Salesforce to query and determine access levels.

Additionally, the component (and the record view in GRAX) respects a user's field-level security. This includes access to fields via profiles and permission sets. It doesn't currently account for whether a user may have View All Data permission set somewhere in Salesforce, so it's possible that the user has more access to fields when viewing the data natively on the Salesforce record versus within GRAX, which is more strict.

Considerations

  • If you have multi-currency enabled, it may help to add the CurrencyIsoCode field as a column to the component so that users can easily tell the currency code for any currency fields.
  • Support for encrypted (classic) fields. While GRAX backups support encrypted fields, the lightning data viewer shows the plain text value. Avoid adding encrypted fields as columns if this is an issue.