setSoftphoneWidth() for Salesforce Classic
Sets the softphone width in pixels for the Salesforce console.
If this method is used in a Salesforce console where multi-monitor components is turned on, an error will be returned because resizing multi-monitor component is not allowed.
| Name | Type | Description |
|---|---|---|
width | number | Softphone width in pixels. The width should be a number that’s equal or greater than 0. |
callback | function | JavaScript method executed when the API method call is completed. |
This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields.
| Name | Type | Description |
|---|---|---|
result | boolean | true if the width was set successfully, false if setting the width wasn’t successful. |
error | string | If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message. |