Uninstalling the GRAX Managed Package

Using the GRAX Salesforce Managed Package is now optional. All GRAX features can be accessed directly via the application's web interface.

What does it mean to uninstall a Managed Package?

Uninstalling a managed package removes its components and data from the org. During the uninstall process, any customizations, including custom fields or links, that you’ve made to the package are removed.

Don't I need the Managed Package to manage and utilize GRAX?

No - Using the GRAX Salesforce Managed Package is now optional. All GRAX features can be accessed directly via the application's web interface.

Displaying GRAX Data within SFDC without the Managed Package

Instead of using the GRAX Salesforce Managed Package Lightning Web Components (LWC), GRAX data can now be displayed on SFDC page layouts, without the Managed Package, via the Embedded LWC Data Viewer.

Managing Permission Sets without the Managed Package

User permission sets can be created via the Auto Config flow during initial configuration, or by manually creating the Console permission sets by using the Salesforce Developer Console.

Migrating Permission Sets from the Managed Package to the Console permission sets

Before starting the migration, run Auto Config (or create the Console permission sets manually) to ensure the destination permission sets exist. The script below will map the Managed Package permission sets to the Console permission sets:

  • GRAX Configuration Admin -> GRAX Console Admin Permission
  • GRAX Advanced User -> GRAX Console Power Permission
  • GRAX User -> GRAX Console Standard Permission

To run the script in the Salesforce Developer Console:

  1. Open the Salesforce Developer Console
  2. Open the Debug menu
  3. Select Open Execute Anonymous Window (or press CTRL + E)
  4. Copy the script below into the Enter Apex Code dialog
  5. Select the Open Log checkbox
  6. Click Execute
private class GRAXLegacyPerm {
  Map<String, Id> psIDs;
  Map<String, Set<Id>> existingConsole;

  public GRAXLegacyPerm() {
        SELECT Id, Name
        FROM PermissionSet
        WHERE name in ('GRAX_Configuration_Admin', 'GRAX_Advanced_User', 'GRAX_User', 'GRAX_Console_Admin_User', 'GRAX_Console_Power_User', 'GRAX_Console_Standard_User')

    psIDs = new Map<String, Id>();
    for(PermissionSet ps : lps){
        System.debug('PermissionSet '+ps.Name +' Id: ' + ps.Id);
        psIDs.put(ps.Name, ps.Id);

    existingConsole = new Map<String, Set<Id>>();
    for (String name : new String[]{'GRAX_Console_Admin_User', 'GRAX_Console_Power_User', 'GRAX_Console_Standard_User'}) {
         List<PermissionSetAssignment> ecpsa = [
            SELECT AssigneeId
            FROM PermissionSetAssignment
            WHERE IsActive=true
              AND PermissionSetId = :psIDs.get(name)

        Set<Id> ecpsuID = new Set<Id>();

        for (PermissionSetAssignment a : ecpsa) {
        existingConsole.put(name, ecpsuID);
        System.debug('Existing '+name +' User Ids: ' + ecpsa);


  public String migratePermSet(String oldPS, String newPS) {
    List<PermissionSetAssignment> migratePS  = new List<PermissionSetAssignment>();
    List<PermissionSetAssignment> lpsuID = [
        SELECT AssigneeId
        FROM PermissionSetAssignment
        WHERE IsActive=true
          AND PermissionSetId = :psIDs.get(oldPS)
          AND AssigneeId NOT IN :existingConsole.get(newPS)

    for(PermissionSetAssignment a : lpsuID){
        System.debug('Migrate '+oldPS+' User: ' + a.AssigneeId + ' to '+newPS);

        migratePS.add( new PermissionSetAssignment (
            PermissionSetId = psIDs.get(newPS),
            AssigneeId =  a.AssigneeId

        if( migratePS.size() > 200) {
            upsert migratePS;
    if( migratePS.size() > 0) {
        try {
            insert migratePS;
        } catch(DmlException e) {
            System.debug('error: ' + e);

    return 'done';

GRAXLegacyPerm glp = new GRAXLegacyPerm();

glp.migratePermSet('GRAX_Configuration_Admin', 'GRAX_Console_Admin_User');
glp.migratePermSet('GRAX_Advanced_User', 'GRAX_Console_Power_User');
glp.migratePermSet('GRAX_User', 'GRAX_Console_Standard_User');

Do I need special permissions to uninstall the Managed Package?

To uninstall packages, you will need the Download AppExchange Packages user permission.

How do I uninstall the Managed Package?

Log in to your Salesforce org where you want to uninstall the GRAX Managed package and follow the steps here.



It is not necessary to save any of the GRAX managed package data. This will only contain configuration and helper job information which is now maintained on the web application.

Uninstall Managed Package

After uninstalling the GRAX Salesforce Managed Package it will appear under the Uninstalled Packages section. Once the uninstall status is complete you can delete the Managed Package by clicking Del under Action. Click OK when prompted to permanently delete it.



All referenced components will need to be removed prior to the uninstalling and deleting the Managed Package. The most common components that will need to be removed are Permission sets and the Lightning Web Component Bundle. If the managed package user permission sets are being used then these will need to be replaced by first manually creating the Console permission sets and assigning them to the users. If the LWC included in the Managed Package are being used, then these will also need to be replaced by the Embedded LWC Data Viewer option.

Additional Information

For additional resources on removing a SFDC Managed Package see here.