context object in the UI extensions SDK contains data related to the authenticated user and HubSpot account, along with data about where the extension was loaded.
Access context data
You can access context data using either approach:- Props-based approach: destructure
contextfrom the callback passed tohubspot.extend(), then pass it to your component as a prop. - Hook-based approach: call the
useExtensionContexthook directly within your component.
Fields
Thecontext object has the following fields.
Universal fields
CRM-specific fields
The following fields are only available in CRM extension points (crm.record.tab, crm.record.sidebar, crm.preview, helpdesk.sidebar):