Custom App Settings

You can add settings of type string or bool.

  1. In Product Admin, click the App Settings tab, and then click the App.

    Note: If the list is empty or doesn't include the App, click NEW APP SETTING GROUP, select the App from the list of downloaded Apps, and then click SAVE.

  2. Click EDIT GROUP APP SETTINGS, and then click NEW APP SETTING.
  3. Complete the Name, select the Type and, if required, set the initial Value, and then click SAVE.

Designer

Once a setting has been added, it can be used in Designer scripting by instantiating a variable through pb.AppSettingHelper.GetAppSetting. For example, for a new setting called, Sales URL:

var SalesURL = pb.AppSettingHelper.GetAppSetting("Sales URL");

In addition, you can pass a boolean parameter with the pb.AppSettingHelper.GetAppSetting method to prevent certain characters, such as backticks (`), equals signs (=), and forward slashes (/), being encoded when the App setting is retrieved. This is achieved by passing the App setting name with a true or false value (if not specified it defaults to false, and special characters remain encoded). For example, using the Sales URL setting from above:

pb.AppSettingHelper.GetAppSetting("Sales URL", true);

The parameter also prevents lesser and greater-than signs (<, >), quotation marks (") and apostrophes (') from being encoded; however, the characters are not accepted as valid setting values.

Article last edited 28 September 2020