GlideCurrencyValue - Scoped

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 2분
  • The GlideCurrencyValue API provides methods that return the currency code and original currency from an associated GlideCurrencyParser.parse() call.

    This API is provided within the sn_currency namespace.

    주:
    There is no constructor for this class.

    GlideCurrencyValue - getAmount()

    Returns the currency amount originally passed into the associated GlideCurrencyParser.parse() call.

    표 1. Parameters
    Name Type Description
    None
    표 2. Returns
    Type Description
    String Original currency passed into the parse() method.

    This example shows how to call the method.

    var gp = new sn_currency.GlideCurrencyParser(); 
    gp.setLocale("eng", "USA");  
    var cv = gp.parse("USD;1234.56"); 
    gs.info('Original currency amount: ' + cv.getAmount());
    

    Output:

    Original currency amount: 1234.56

    GlideCurrencyValue - getCurrencyCode()

    Returns the currency code used to parse the currency in the associated GlideCurrencyParser.parse() call.

    표 3. Parameters
    Name Type Description
    None
    표 4. Returns
    Type Description
    String Three-letter ISO currency code used to parse the currency.

    This example shows how to call the method.

    var gp = new sn_currency.GlideCurrencyParser(); 
    gp.setLocale(eng, USA); 
    var cv = gp.parse("USD";"1234.56"); 
    gs.info('Parsed currency code: ' + cv.getCurrencyCode());
    

    Output:

    Parsed currency code: USD