Migrating from First Generation to Second Generation Managed Package
Overview
This guide provides step-by-step instructions for migrating from the soon to be deprecated First Generation Managed Package to the Second Generation Managed Package.
The Second Generation package offers:
Reduced custom code in your org
Elimination of secrets stored within Salesforce
Faster implementation and easier maintenance
New Lightning Web Components including Global Search
Leverages modern Salesforce packaging tools
Prerequisites
The following are required before beginning this migration:
GRAX Application: Ensure you have a healthy GRAX application running with Backup enabled
Salesforce Permissions: You need permissions to install/uninstall Managed Packages (System Admin profile is sufficient)
Testing Environment: We strongly recommend testing this migration in a sandbox org before executing in production
Migration Process Overview
Document Current First Generation Component Usage
Before making any changes, document where First Generation components are currently deployed.
Open
Setupin SalesforceUse
Quick Findto navigate toLightning App BuilderFor each page that contains GRAX components:
Note the object type (e.g., Case, Account, Contact)
Document which GRAX components are present
Record any custom configuration settings for each component
Take screenshots if helpful
Install Second Generation Managed Package
The Second Generation package can be installed while First Generation is still running, preventing downtime for your users.
Choose the Correct Installation Link
For Production Orgs (including Developer Edition):
For Sandbox Orgs:
For detailed installation information, see the Second Generation Installation Guide.
Install the Package
Log in to your Salesforce org as a System Administrator
Open the appropriate installation link above
On the package installation screen, select
Install for All Users(recommended) orInstall for Admins OnlyInstall for All Users: Enables all internal users to access Second Generation components immediatelyInstall for Admins Only: Requires manual permission assignment later for non-admin users
Click
InstallWait for the installation to complete (typically less than one minute)
You will receive a confirmation email when installation succeeds
If you installed for Admins Only and later need to grant access to other profiles:
Go to
Setup> Installed PackagesLocate
GRAX Lightning Web ComponentsClick
View ComponentsFor each component (Versions Apex Class, CustomSettings Apex Class):
Click
SecurityAdd the required user profiles
Assign the GRAX Search Tab to desired Salesforce user apps
Configure Second Generation Settings
The Second Generation package requires configuration before components will function.
Configure Custom Settings
In
Setup, useQuick Findto search forCustom SettingsFind
GRAX Settingsand clickManageClick
Newto create an organization-level default settingIn the
GRAX URLfield, enter your GRAX application URL:Format:
https://[your-grax-domain].comClick
Save
Ensure that there is no trailing slash in the GRAX URL field
Configure Trusted URL for GRAX Application
In
Setup, useQuick Findto search forTrusted URLsClick
New Trusted URLConfigure the following:
API Name:
GRAX_Application(or any name you prefer)URL: Your GRAX application URL (same as Custom Settings, e.g.,
https://mycompany.grax.io)Check:
frame-srcLeave checked:
img-src
Click
Save
Configure Trusted URL for GRAX HQ
Still in
Trusted URLs,clickNew Trusted URLagainConfigure the following:
API Name:
GRAX_HQ(or any name you prefer)URL:
https://hq.grax.comCheck:
frame-srcLeave checked:
img-src
Click
Save
Update Page Layouts with Second Generation Components
Now that Second Generation is installed and configured, update your page layouts to use the new components.
Understanding Component Differences
Second Generation includes three components:
Related Records: View related records (live, deleted, or archived)Record Versions: Explore single-record history and restore dataGlobal Search: Search for data within GRAX using filters and conditions
For detailed information about each component, see the Second Generation Features Guide.
Update Each Page Layout
For each page layout documented in this step:
Navigate to the object record page in Salesforce
Open the
Setupsidebar (gear icon)Click
Edit [Object] Pageunder CustomizationIn the Lightning App Builder, find Second Generation components under
Custom - Managed
Place GRAX components on a separate tab that is not loaded by default to improve page load times
Drag the appropriate Second Generation component onto the page
Configure the component settings
Related Records Component Settings
Related Object: API name of the object type to displayDataset Selection: Choose All, Archived, Deleted, or Archived or DeletedChild Level: Hierarchy level (1 = immediate children, 2 = grandchildren, etc.)Fields: Comma-separated list of Field API names to displayRecords Per Page: Number of records per pageOverride Title: (Optional) Custom titleHeight: Component heightAdditional Configuration: (Optional) Advanced settings
Record Versions Component Settings
Records Per Page: Number of versions per pageOverride Title: (Optional) Custom titleHeight: Component heightClick
Saveto save the page layoutRepeat for all page layouts that need GRAX components
Optional: Add Global Search Tab
The Global Search component can be added as a standalone Custom Tab:
The GRAX Search Tab is automatically included with the Second Generation package
Add it to relevant Salesforce apps via
App ManagerConfigure search behavior via
Custom Settingsif needed:Search Tab: Template Search: Enable for template-based searchSearch Tab: Show Template ID: Specify a template ID to display
Verify Second Generation Functionality
Before uninstalling First Generation, verify that Second Generation components work correctly.
Verification Checklist
Test Component Access:
Log in as different user types (admin, standard user, etc.)
Navigate to pages with Second Generation components
Verify users can see the components based on their permissions
Test Component Functionality:
Verify components load GRAX content correctly
Test Related Records component: confirm it displays related records
Test Record Versions component: confirm it shows record history
If applicable, test Global Search: run a search and verify results
Test Permissions:
Confirm users with GRAX Console permissions can access components
Users should have one of these permission sets:
GRAX Console Standard PermissionGRAX Console Seeding PermissionGRAX Console Purge PermissionGRAX Console Power PermissionGRAX Console Admin Permission
First-Time User Authorization:
Users must self-authorize the GRAX Connected App on first use
Have users open the GRAX application in a separate tab to complete authorization
Alternatively, admins can pre-authorize users via Connected App settings
Document Any Issues:
Note any components that don't load correctly
Record any error messages
Contact support if you encounter unexpected behavior
Do not proceed to uninstall First Generation until Second Generation is fully verified.
Uninstall First Generation Managed Package
Once Second Generation is verified and working, you can safely remove First Generation.
Prepare for Uninstallation
Notify Users: Inform users that First Generation components will be temporarily unavailable during uninstallation
Remove First Generation Components from Page Layouts:
Edit each page layout that has First Generation components
Remove the First Generation GRAX components
Save the page layouts
Remove Permission Set Assignments:
In
Setup, navigate toPermission SetsFind permission sets that start with
GRAX -Remove these permission sets from all users
Uninstall the Package
For detailed uninstallation information, see the First Generation Uninstallation Guide.
In
Setup, useQuick Findto search forInstalled PackagesFind
GRAX(First Generation) in the packages listClick
UninstallCheck the confirmation checkbox
Click
Uninstall
Handle Uninstall Errors
On the first attempt, you may receive errors about components still being used. Common issues include:
Users still assigned permission sets:
Remove package permission sets (those starting with
GRAX -) from all users
Lightning Web Components still present in page layouts:
Remove First Generation components from all page layouts
Apex classes still referenced in Scheduled Jobs:
Navigate to
Setup>Apex Jobs>Scheduled JobsDelete any jobs named
GRAXScheduledWorker
Retry Uninstallation
After resolving reported issues, repeat the uninstallation steps
Continue resolving issues and retrying until uninstallation succeeds
You will receive a confirmation email when uninstallation is complete
Troubleshooting
Second Generation Components Not Loading
Issue: Components show blank or display errors
Solutions:
Verify
Custom Settingscontain the correct GRAX application URLVerify both
Trusted URLsare configured correctlyCheck that users have appropriate GRAX Console permission sets
Confirm users have authorized the GRAX Connected App
Verify the GRAX application is running and healthy
Users Cannot See Second Generation Components
Issue: Components are not visible to certain users
Solutions:
If package was installed for
Admins Only, manually assign component access to user profilesVerify users have GRAX Console permission sets assigned
Check that the GRAX Search Tab is added to the user's Salesforce app
First Generation Uninstall Fails Repeatedly
Issue: Uninstallation continues to fail after resolving reported issues
Solutions:
Check for custom code, workflows, or process builders that reference GRAX objects or classes
Look for validation rules that reference GRAX fields
Review all page layouts thoroughly for remaining First Generation components
Contact GRAX Support for assistance
Getting Help
If you encounter issues during migration or have questions not covered in this guide:
Contact GRAX Support:
Email: [email protected]
Support is available to assist with migration issues
Last updated
Was this helpful?

