---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# cabrillo.message - Client

# cabrillo.message - Client {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Cabrillo JS functions to display
messages in the native UI.

## cabrillo.message - showMessage(String style, String title) {#ariaid-title2}

Displays a message in the native UI.
{#CM-showMessage__table_oyf_tnn_wbb__entry__3}

| Name | Type | Description |
|-|-|-|
| style | String | Style of the banner. Possible values: * cabrillo.message.ERROR_MESSAGE_STYLE * cabrillo.message.INFO_MESSAGE_STYLE * cabrillo.message.SUCCESS_MESSAGE_STYLE * cabrillo.message.WARNING_MESSAGE_STYLE {#CM-showMessage__ul_rlb_lck_pyb} For more information, see [Cabrillo JS constants - message styles](https://servicenow-prod.fluidtopics.net/WtDkBSAY1qbIxQA~Yux4Ow#cabrillo-message-styles "Constants to use when setting the style of a message."). |
| title | String | Text to display in the banner. |
[Table 1. Parameters]

{#CM-showMessage__table_oyf_tnn_wbb} {#CM-showMessage__table_pyf_tnn_wbb__entry__2}

| Type | Description |
|-|-|
| promise | If successful, an unresolved object, otherwise an error. |
[Table 2. Returns]

{#CM-showMessage__table_pyf_tnn_wbb}  

    var style = cabrillo.message.SUCCESS_MESSAGE_STYLE;
    var title = "You did it!";

    cabrillo.message.showMessage(
       style,
       title
    ).then(function(response) {
       console.log('success');
    }, function(error) {
       console.log(error);
    });


