public Set<Canvas.ContextTypeEnum> excludeContextTypes()
Type: SET<Canvas.ContextTypeEnum>
Implement this method to specify which attributes to disable in the context of the canvas app. A disabled attribute will set the associated canvas context information to null.
Disabling attributes can help improve performance by reducing the size of the signed request and canvas context. Also, disabled attributes do not need to be retrieved by Salesforce, which further improves performance.
See the Canvas Developer Guide for more information on context information in the Context object that’s provided in the CanvasRequest.
This example implementation specifies that the organization information will be disabled in the canvas context.
public Set<Canvas.ContextTypeEnum> excludeContextTypes() { Set<Canvas.ContextTypeEnum> excluded = new Set<Canvas.ContextTypeEnum>(); excluded.add(Canvas.ContextTypeEnum.ORGANIZATION); return excluded; }