Start a conversation

Solution Management Toaster Message Timeout Configuration

Problem

When using the CloudSense Solution Management API to display custom messages (e.g., error messages, success messages) via CS.SM.displayMessage(), the timeout parameter is ignored. Messages disappear after the default timeout (e.g., 3-5 seconds) instead of the specified duration.

For example, the following code does not work as expected:

CS.SM.displayMessage('This is an important error message', 'error', {timeout: 15000});

The message disappears after 3-5 seconds instead of 15 seconds.

Cause

In CloudSense Release 33 (R33) and later, the timeout for toaster messages (informational pop-up messages displayed in the Solution Management Console) is controlled globally via a Custom Setting, not via the API parameter.

The timeout parameter in the CS.SM.displayMessage() API method is ignored in favor of the global setting.

Technical Details

The global timeout is configured in the "SM Option (Toaster Interval)" Custom Setting. This setting defines the duration (in milliseconds) that all toaster messages remain visible before automatically dismissing.

Resolution

Step 1: Navigate to the Custom Setting

  1. In Salesforce, navigate to Setup > Custom Settings.
  2. Locate and click csutil__JSON_Data__c (or the equivalent custom setting for CloudSense configuration).
  3. Click Manage to view the existing configuration records.

Step 2: Locate or Create the "SM Option (Toaster Interval)" Record

  1. Look for a record with the Name field set to SM Option (Toaster Interval) or similar.
  2. If the record exists, click Edit.
  3. If the record does not exist, click New and create it:
  4. Name: SM Option (Toaster Interval)
  5. Data Type: Number or Text (depending on your org's configuration)

Step 3: Update the Timeout Value

  1. In the Value field, enter the desired timeout duration in milliseconds.
  2. For example, to set a 15-second timeout, enter 15000.
  3. To set a 30-second timeout, enter 30000.
  4. Save the record.

Step 4: Clear the Cache (if applicable)

After updating the Custom Setting, the change may not take effect immediately due to caching. To force a refresh:

  1. Navigate to Setup > Custom Settings > csutil__JSON_Data__c.
  2. Delete any cached entries related to "SM Option (Toaster Interval)" (if applicable).
  3. Alternatively, wait for the cache to expire (typically 24 hours) or restart the Salesforce session.

Step 5: Test the Toaster Message

  1. Navigate to the Solution Management Console.
  2. Trigger a custom message using CS.SM.displayMessage():
CS.SM.displayMessage('This is a test message', 'info');
  1. Verify that the message remains visible for the duration specified in the Custom Setting.

Prevention

  • Documentation: Document the global toaster timeout setting in your org's CloudSense configuration guide.
  • Communication: Inform developers and administrators that the timeout parameter in CS.SM.displayMessage() is not used in R33 and later, and that the global setting must be updated instead.
  • Testing: After updating the Custom Setting, test with both short and long messages to ensure the timeout is appropriate for all use cases.

Additional Notes

  • The global timeout applies to all toaster messages in the Solution Management Console, including system-generated messages (e.g., "Solution saved successfully") and custom messages.
  • If you require different timeout durations for different message types (e.g., longer timeout for errors, shorter for informational messages), this is not supported in the current implementation. Consider submitting a feature request to CloudSense.
  • In releases prior to R33, the timeout parameter in CS.SM.displayMessage() was respected. If you are using an older release, the API parameter will work as expected.
  • The Custom Setting name and structure may vary depending on your CloudSense implementation. Consult your CloudSense administrator or refer to your org's configuration documentation if you cannot locate the "SM Option (Toaster Interval)" setting.
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments