setCustomConsoleComponentButtonStyle()
ページに表示されるアプリケーションレベルのカスタムコンソールコンポーネントを起動するために使用する、ボタンのスタイルを設定します。このメソッドは、API バージョン 25.0 以降でのみ使用できます。
構文
1sforce.console.setCustomConsoleComponentButtonStyle(style:String, (optional)callback: Function)引数
| 名前 | 型 | 説明 |
|---|---|---|
| style | string | カスタムコンソールコンポーネントの起動に使用されるボタンのスタイル。サポートされるスタイルには、フォント、フォントの色、背景色などがあります。フォントとフォントの色は Internet Explorer® 7 では指定できません。 |
| callback | function | メソッドの完了時にコールされる JavaScript メソッド。 |
サンプルコード – Visualforce
1<apex:page>
2
3 <A HREF="#" onClick="testSetCustomConsoleComponentButtonStyle();return false">
4 Click here to set the style of a button used to launch a custom console component</A>
5
6 <apex:includeScript value="/support/console/52.0/integration.js"/>
7 <script type="text/javascript">
8 function testSetCustomConsoleComponentButtonStyle() {
9 sforce.console.setCustomConsoleComponentButtonStyle('background:red;');
10 }
11 </script>
12</apex:page>応答
このメソッドは非同期であるため、コールバックメソッドのオブジェクトで応答を返します。応答オブジェクトには次の項目が含まれます。
| 名前 | 型 | 説明 |
|---|---|---|
| success | boolean | ボタンスタイルの設定に成功した場合は true、ボタンスタイルの設定に失敗した場合は false。 |