カテゴリを含むインサイトを表示する公開処理
recordContextを現在のボウ・サー・タブ・アクティブ・レコードとみなして、インサイトを表示するTypescriptの例を次に示します:
let recordContext: IRecordContext = await uiEventsFrameworkInstance.getCurrentBrowserTabContext().getActiveRecord();
let insightContext: IInsightContext = await recordContext.getInsightsContext();
const payload: IShowInsightsRequest = uiEventsFrameworkInstance.requestHelper.createPublishRequest('ShowInsights');
payload.setId('insightsId1');
payload.setTitle('Custom title');
payload.setHeader('Custom category');
insightContext.publish(payload).then((response: IInsightsOperationResponse) => {
console.log((response.getResponseData() as IInsightsOperationResponseData).getInsightsId());
});
recordContextを現在のボウサ・タブ・アクティブ・レコードとみなして、インサイトを表示するJavaScriptの例を次に示します
let recordContext = await uiEventsFrameworkInstance.getCurrentBrowserTabContext().getActiveRecord();
let insightContext = await recordContext.getInsightsContext();
const payload = uiEventsFrameworkInstance.requestHelper.createPublishRequest('ShowInsights');
payload.setId('insightsId1');
payload.setTitle('Custom title');
payload.setHeader('Custom category');
insightContext.publish(payload).then((response) => {
console.log(response.getResponseData().getInsightsId());
});