Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The following article outlines how to use Page Extensions to hide or modify the Balance value on the left sidebar menudisplayed on an account. This script works across the board, regardless of logged in user. It can also be adjusted to hide the ‘full balance’ or other fields as need on the sidebarneeded.

Hiding the Balance

  1. Click on the on Setup Tab

  2. Click Page Extensions

  3. Click the Add button

  4. Enter the following information:
    Name – any name you would like here
    Page – /  (the forward slash indicates that it should work on all pages)
    Script – (see below)

    Code Block
    languagejs
    var balance = document.getElementById('balance');
    if (balance!=null) {
        var row = balance.parentNode.parentNode;
        row.parentNode.removeChild(row);
    }
  5. Click Save

Hiding the Balance if Futurebalance is Set

  1. Click on the on Setup Tab

  2. Select the Page Extensions

  3. Click the Add button

  4. Enter the following information:
    Name – any name you would like here
    Page – /  (the forward slash indicates that it should work on all pages)
    Script – (see below)

    Code Block
    languagejs
    var balance = document.getElementById('balance');
    var fullBalance = document.getElementById('futurebalance');
    if (balance != null && fullBalance != null)
    {
        var row = balance.parentNode.parentNode;
        row.parentNode.removeChild(row);
    }
  5. Click Save