Show:

caption Methods

This class provides methods that allow you to perform actions on the caption of a Sage CRM field.

Methods

background
(
  • color
)

Sets the background color of a field caption.

Parameters:

  • color String | Boolean

    Specifies the background color name.
    When this parameter is empty, the background color is yellow by default.
    When this parameter is set to false, no background color is used.

Returns:

Object

Examples:

    // Sets the background color of the case_problemnote field caption to yellow.
    crm.fields("case_problemnote").caption().background(); 
    // Sets the background color of the case_problemnote field caption to red.
    crm.fields("case_problemnote").caption().background("red"); 
    // Removes the background color from the case_problemnote field caption.
    crm.fields("case_problemnote").caption().background(false);
bold
(
  • remove
)

Sets the font weight (bold or normal) of a field caption.

Parameters:

  • remove Boolean

    When this parameter is empty, the field caption is displayed in bold font.
    When this parameter is set to false, the field caption is displayed in normal font.

Returns:

Object

Examples:

    // Sets the font weight of the case_problemnote field caption to bold.
    crm.fields("case_problemnote").caption().bold();
    // Sets the font weight of the case_problemnote field caption to normal.
    crm.fields("case_problemnote").caption().bold(false);
color
(
  • obj
)

Sets the color of a field caption.

Parameters:

  • obj String | Boolean

    When this parameter is empty, the field caption is displayed in default color (yellow).
    When this parameter is set to color name, the field caption is displayed in that color.
    When this parameter is set to false, the field caption is displayed in black.

Returns:

Object

Examples:

    // Sets the color of the case_problemnote field caption to the default color (yellow).
    crm.fields("case_problemnote").caption().color();
    // Sets the color of the case_problemnote field caption to red.
    crm.fields("case_problemnote").caption().color("red");
    // Sets the color of the case_problemnote field caption to black.
    crm.fields("case_problemnote").caption().color(false);
fontSize
(
  • obj
)

Sets the font size (in pixels) of a field caption.

Parameters:

  • obj String | Boolean

    Specifies the font size. When this parameter is empty or set to false, the default font size is used.

Returns:

Object

Examples:

    // Sets the font size of the case_problemnote field caption to 20 pixels.
    crm.fields("case_problemnote").caption().fontSize(20);
hide
(
  • obj
)

Immediately hides a field caption on the user interface.

Parameters:

  • obj Boolean

    When this parameter is empty, the field caption is hidden.
    When this parameter is set to false, the field caption is shown.

Returns:

Object

Examples:

    // Hides the case_problemnote field caption on the user interface.
    crm.fields("case_problemnote").caption().hide();
    // Shows the case_problemnote field caption on the user interface.
    crm.fields("case_problemnote").caption().hide(false); 
italic
(
  • obj
)

Italicizes the font of a field caption.

Parameters:

  • obj Boolean

    When this parameter is empty, the field caption is displayed in italic font.
    When this parameter is set to false, the field caption is displayed in normal font.

Returns:

Object

Examples:

    // Italicizes the case_problemnote field caption.
    crm.fields("case_problemnote").caption().hide();
    // Displays the case_problemnote field caption in normal font.
    crm.fields("case_problemnote").caption().italic(false);
overline
(
  • obj
)

Adds a line above a field caption.

Parameters:

  • obj Boolean

    When this parameter is empty, there is a line above the field caption.
    When this parameter is set to false, there is no line above the field caption.

Returns:

Object

Examples:

    // Adds a line above the case_problemnote field caption.
    crm.fields("case_problemnote").caption().overline();
show
(
  • remove
)

Shows a field caption that has been hidden.

Parameters:

  • remove Boolean

    When this parameter is empty, the field caption is shown.
    When this parameter is set to false, the field caption is hidden.

Returns:

Object

Examples:

    // Shows the case_problemnote field caption on the user interface.
    crm.fields("case_problemnote").caption().show();
strike
(
  • obj
)

Adds a line through the middle of a field caption.

Parameters:

  • obj Boolean

    When this parameter is empty, there is a line through the middle of the field caption.
    When this parameter is set to false, there is no line through the middle of the field caption.

Returns:

Object

Examples:

    // Adds a line through the middle of the case_problemnote field caption.
    crm.fields("case_problemnote").caption().strike();
underline
(
  • obj
)

Adds a line under a field caption.

Parameters:

  • obj Boolean

    When this parameter is empty, there is a line under the field caption.
    When this parameter is set to false, there is no line under the field caption.

Returns:

Object

Examples:

    // Adds a line under the case_problemnote field caption.
    crm.fields("case_problemnote").caption().underline();

© Copyright Sage Technologies. All rights reserved.