この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

$MessageChannel

組織で定義されたメッセージチャネルへのアクセスを提供するグローバル差し込み項目の型。

使用方法

Visualforce ページでこの式を使用して、メッセージチャネルにアクセスし、Lightning Message Service API を使用します。

1<apex:page>
2    <script>
3        // Load the MessageChannel token in a variable
4        var SAMPLEMC = "{!$MessageChannel.SampleMessageChannel__c}";
5        function handleClick() {
6            const payload = {
7                recordId: "some string",
8                recordData: {value: "some value"}
9            }
10            sforce.one.publish(SAMPLEMC, payload);
11        }
12    </script>
13    <div>
14        <p>Publish SampleMessageChannel</p>
15        <button onclick="handleClick()">Publish</button>
16    </div>
17</apex:page>