UpdateSidePane operation - setIcon
This operation is used to update a particular side pane's section or icon or
visibility in the Fusion application. The ID of that sidePane should be passed while
creating the SidePaneContext object.SidePane icon can be set to a different icon than what
user has already customised, by calling the setIcon
API.
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.setIcon('newIcon');
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.setIcon('newIcon');
sidePaneContext.publish(payload).then((response) => {
console.log(response);
}).catch(() => { })
}