UpdateSidePane operation - setSectionId
This operation is used to update a particular side pane's section or icon or
visibility in the Fusion application. The ID of the sidePane should be passed while creating
the SidePaneContext object. The SidePane section can be set to a different section than what
you may have already extended by calling the setSectionId
API. The Section
ID should match the Section IDs which used when the SidePane was extended.
Here's a TypeScript example:
const updateSidePaneContext = async () => {
const uiEventsFrameworkInstance: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
const sidePaneContext: ISidePaneContext = await uiEventsFrameworkInstance.getSidePaneContext('sidePaneId');
const payload:IUpdateSidePaneRequest = uiEventsFrameworkInstance.requestHelper.createPublishRequest('UpdateSidePane') as IUpdateSidePaneRequest;
payload.setSectionId('newSectionId');
sidePaneContext.publish(payload).then((response: IOperationResponse) => {
console.log(response)
}).catch(() => { })
}
Here's a JavaScript example:
const updateSidePaneContext = async () => {
const uiEventsFrameworkInstance = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
const sidePaneContext = await uiEventsFrameworkInstance.getSidePaneContext('sidePaneId');
const payload = uiEventsFrameworkInstance.requestHelper.createPublishRequest('UpdateSidePane');
payload.setSectionId('newSectionId');
sidePaneContext.publish(payload).then((response) => {
console.log(response);
}).catch(() => { })
}