GlideCurrencySymbol - Scoped, Global

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 3분
  • The GlideCurrencySymbol API provides methods to retrieve currency symbols.

    Symbol information is also available in the Currency [fx_currency] table, but this API has built-in caching that minimizes the queries issued to fx_currency.

    This API allows you to work with currency symbols anywhere on the ServiceNow AI Platform, not just in Currency and FX Currency fields.

    This API requires the FX Currency (com.glide.currency2) plugin, which is available by default. This API is provided within the sn_currency namespace.

    GlideCurrencySymbol - getCurrencySymbol(String letterCode)

    Returns the corresponding symbol for a given alphabetic currency code.

    표 1. Parameters
    Name Type Description
    letterCode String ISO 4217 alphabetic currency code.
    표 2. Returns
    Type Description
    String Currency symbol for the given code.

    This example returns the currency symbol for United States dollars (USD).

    gs.info(sn_currency.GlideCurrencySymbol.getCurrencySymbol("USD"));

    Output:

    $

    GlideCurrencySymbol - getSortedActiveCurrencySymbols()

    Returns all currency symbols that are currently active on the instance.

    표 3. Parameters
    Name Type Description
    None
    표 4. Returns
    Type Description
    Array Array of currency symbol objects that are currently active on the instance.

    Symbols are returned in sorted order by their Unicode code, which is also used when ordering by symbol in the Currency [fx_currency] table.

    [
      {
        "code": "String",
        "symbol": "String"
      }
    ]
    <Array>.code Currency code.

    Data type: String

    <Array>.symbol Currency symbol.

    Data type: String

    This example lists each currency code and symbol that is currently active on the instance.

    var symbols = sn_currency.GlideCurrencySymbol.getSortedActiveCurrencySymbols();
    for (idx in symbols) {
        gs.info(symbols[idx]["code"] + ": " + symbols[idx]["symbol"]);
    };

    Output:

    USD: $
    CHF: CHF
    GBP: £
    JPY: ¥
    EUR: €