Set the context of your current window or view environment. The context will be saved in any platform snapshots. The context data must be serializable. This can only be called from a window or view that has been launched into a platform.
Example
const platform = fin.Platform.getCurrentSync();
const myContext = {
security: 'STOCK',
currentView: 'detailed'
}
await platform.setContext(myContext);
console.log('context updated');