cmEngage Hub

Troubleshooting Guide



1 — Activity Panel Not Visible on Page

Symptom: The Activity Panel component does not appear at all on a record page.

#

Check

How to Verify

Fix

1

Component not added to the page layout

Open the record page → gear icon → Edit Page → inspect the canvas

Drag Activity Panel (activityPanel) from the Custom components section and drop it onto the page. Save and Activate.

2

Page not activated after adding

In Lightning App Builder, check the activation status badge at the top

Click Activation and assign as org/app/profile default as appropriate.

3

User does not have EngageHub permission set

Setup → Users → open the user → Permission Set Assignments

Assign the EngageHub User permission set.

4

Component added to wrong page variant

The page may have multiple record type or profile assignments

In Lightning App Builder, check all page assignments and ensure the variant the user sees has the component.


2 — Activity Panel Displays a Red Error Banner

Symptom: The component renders but shows a red alert banner instead of action buttons and timeline.

The error message is surfaced directly from the Apex response. The component displays errorMessage when either the Activity_Buttons_Configuration metadata call or the Default_Activity_Filters metadata call returns isSuccess: false.

Likely Cause

Diagnostic Step

Fix

Activity_Buttons_Configuration custom metadata record is missing or has malformed JSON in Value__c

Go to SetupCustom Metadata TypesActivity Panel Configuration → open the Activity Buttons Configuration record → inspect the Value__c field

Paste valid JSON with a buttonMapping array. Validate JSON at a tool before saving.

Default_Activity_Filters record has invalid JSON

Same path → open Default Activity Filters record

Validate and correct the Value__c JSON.

Apex class ActivityPanelController is not accessible to the running user

Setup → Apex ClassesActivityPanelController → Security

Ensure the user's profile or permission set has at least Read access to this class.

The Default_Schema_Model record (getSchema call) returns an error

Check browser console for Error fetching schema log

Validate JSON in the Default Schema Model custom metadata record's Value__c field. All action keys (e.g., "New Task", "Log Call") must be present.


3 — Action Buttons Missing or Dropdown Disabled

Symptom: Some or all action buttons (Log a Call, New Task, New Event, New Note) are absent, or the dropdown chevron is greyed out.

3a — All Buttons Missing

The loadMetadata method parses Activity_Buttons_Configuration and splits entries into regular buttons (isDropdown: false) and dropdown entries (isDropdown: true). If this call fails silently, _allButtons stays empty.

  1. Open browser Developer Console → Console tab and look for the log Buttons config found. If absent, the metadata record did not return data.

  2. Verify the Activity_Buttons_Configuration record exists under Setup → Custom Metadata Types → Activity Panel Configuration.

  3. Confirm the Value__c field contains a valid JSON object with a buttonMapping array.

3b — Specific Button Missing for a Particular Object or Record Type

Buttons support a hiddenFor filter. If the button config contains an entry like:

"hiddenFor": [{ "objectName": "Account", "recordTypes": ["CustomerAccount"] }]

…the button is hidden for that record type on that object. This is controlled entirely by the _filterByVisibility method.

  1. Open the Activity_Buttons_Configuration metadata record.

  2. Inspect the hiddenFor array for each missing button.

  3. Remove or adjust the hiddenFor entry for the affected object/record type combination.

3c — Dropdown Chevron Disabled

The dropdown button is disabled when dropdownOptions (buttons with isDropdown: true) is empty.

  1. Verify the Activity_Buttons_Configuration record includes at least one button with "isDropdown": true.

  2. Check that none of the dropdown buttons are suppressed by hiddenFor for the current object/record type.


4 — Activity Timeline Empty or Not Loading

Symptom: The timeline shows no activities even though activity records exist for the record, or the spinner runs indefinitely.

4a — Spinner Runs Indefinitely

The spinner is controlled by isLoading in activityRecordLogs. If any Apex promise in loadActivityTimeline is pending forever, the spinner never clears.

  1. Open browser console and check for unresolved network calls to ActivityRecordLogsController.

  2. Check if getActivityRecordConfigs is returning data — this is the first call; if it times out, nothing else runs.

  3. Verify ActivityRecordLogsController is accessible to the user's profile.

4b — Timeline Empty — No Past or Upcoming Activities

Check

Details

Active filters are too restrictive

The default filter may be set to My activities + a narrow date range. Click the Settings gear icon and change Activities to Show to "All activities" and Date Range to "All time", then click Apply.

Activity_Record_Configuration metadata record is missing or has no objectConfig for the current object

Setup → Custom Metadata Types → Activity Panel Configuration → Activity Record Configuration. Confirm the Value__c field includes an objectConfig entry for the current object's API name.

getSObjectTypeById returns null

This can happen if the running user lacks Read access to the record's object. Check object-level security for the user's profile.

Activities exist on a child object but childConfig is not configured

Open the Activity_Record_Configuration metadata record and confirm a childConfig array is present for the parent object. Each entry needs sObjectName, relationField, and optionally whereClause.

The Activity_UI_Event__e platform event namespace field names do not match

The component reads cm_activity__Parent_Record_Id__c and cm_activity__Event_Type__c. If the namespace prefix changed, these lookups silently return undefined. See Section 8.

4c — Only Upcoming Activities Shown, No Past Activities (or Vice Versa)

The timeline splits into upcomingAndOverdue and pastActivities based on the sortingDate returned by Apex. If sortingDate is null for a record, it is silently skipped during grouping.

  1. Confirm the Apex getCurrentAndParentActivities method is populating sortingDate for the expected activity types.

  2. Check the active Date Range filter — "Next 7 days" filters out all past activities by design.


5 — Filters Not Working or Returning Unexpected Results

Symptom: Applying filters via the Settings modal has no effect, shows wrong results, or the Filter Settings modal itself does not open.

5a — Filter Settings Modal Does Not Open

The gear icon calls openFilterBox. If the Activity Panel's errorMessage is set, the entire button row and filter row are hidden by the if:false={errorMessage} template guard — confirming this is a metadata error (see Section 2).

5b — "My Activities" Filter Shows No Results

The filter compares activity.assignedTo.recordId to loggedInUser.recordId. If getUserAndCurrentRecord failed silently, loggedInUser is an empty object and the comparison always fails.

  1. Open browser console for errors on getUserAndCurrentRecord.

  2. Confirm ActivityPanelController has access to the running user profile.

5c — Date Range Filter Returns Wrong Activities

The filter converts dates to/from the user's timezone using the timeZone value returned by getUserAndCurrentRecord. The timezone string must be in GMT±HH:MM format. Named timezone strings like America/Los_Angeles are parsed by parseTimezoneOffset as 0 (fallback), which shifts all comparisons to UTC.

Verify the timezone value returned from getUserAndCurrentRecord in the browser console. If it is a named timezone (e.g., America/Los_Angeles), the Apex method needs to convert it to GMT offset format before returning.

5d — "Activity Type" Checkbox Shows No Options in Filter Modal

Options are loaded from the Default_Activity_Filters metadata record's options.activityTypeOptions field. If the field is missing, the code falls back to hardcoded defaults. Confirm the Value__c JSON includes:

"options": {
  "activityTypeOptions": [...]
}


6 — Create / Edit / Log Call Modal Issues

Symptom: The action modal opens but fields are missing, dropdowns are empty, or required field validation is not firing.

6a — Modal Opens But Some Fields Are Missing

All modal fields are driven by the Default_Schema_Model custom metadata record. The computedFields getter renders whatever is defined in schemaToUse[action].fields.

  1. Setup → Custom Metadata Types → Activity Panel Configuration → Default Schema Model.

  2. Open the Value__c JSON and locate the action key (e.g., "New Task", "Edit Event", "Log Call").

  3. Verify the field entry exists with correct fieldAPIName, name, and at least one rendering flag (isInput, isCombobox, isTextArea, isRecordLookup, isRichText, or isCheckbox).

6b — Picklist / Combobox is Empty

The loadPicklistOptions method calls ActivityUtils.getPicklistValue for each isCombobox or isCustomCombobox field at modal open time.

Cause

Fix

The field API name in the schema does not match the actual field on the object

Verify fieldAPIName in the Default_Schema_Model JSON against Setup → Object Manager → Task/Event → Fields.

ActivityUtils Apex class is not accessible

Add Read access to ActivityUtils on the user's profile or permission set.

Dependent picklist: controllingField value is blank

The controlling field's value must be set in formData before the dependent field enables. Pre-populate the controlling field's default value in the schema's fields list.

6c — "Who" / "What" / "Assigned To" Lookup Shows No Searchable Objects

These fields use the c-record-lookup component which receives the object list from actionConfig.whoObjects, whatObjects, and assignedToObjects. These are populated by getObjects and getWhatObjects Apex calls wired in activityPanel.

  1. Open browser console and check for errors on who getObjects error, what getObjects error, or assignedTo getObjects error.

  2. Verify ActivityPanelController.getObjects and getWhatObjects return the expected API name arrays.

  3. If the object list is correct but icons are missing, getObjectInfos (Lightning wire adapter) may be failing — check for who getObjectInfos error in console.

6d — Required Field Validation Does Not Prevent Save

The isValid method queries lightning-input, lightning-combobox, and c-record-lookup elements and calls checkValidity. The c-record-lookup component must implement the checkValidity and reportValidity interface. If it does not, required lookup fields will not block the save.


7 — Flow-Based Buttons Not Launching (Send Secure Email, Send SMS, Send eForm)

Symptom: Clicking a dropdown button (Send Secure Email, Send SMS, Send eForm) does nothing, or the flow modal opens empty.

#

Cause

Fix

1

Flow is Inactive

Setup → Flows → locate the flow by API name → activate it. Expected API names: Send_Secure_Email, Send_SMS, Send_eForm.

2

Flow API name in Activity_Buttons_Configuration does not match the deployed flow

Open the metadata record → screenFlowName value must exactly match the Flow's API name (case-sensitive, underscores matter).

3

Flow input variable name mismatch

The component passes one variable: { name: btn.parameterName, type: 'String', value: this.recordId }. The Flow must accept a Text input variable whose API name exactly matches parameterName in the button config (e.g., contactId, parentId).

4

Flow modal opens but appears blank on desktop

The lightning-flow element is queried with a 1-second setTimeout. If the component re-renders before the timeout fires, the element reference may be lost. This is a timing issue — check browser console for Cannot read properties of null (reading 'startFlow'). Workaround: increase the timeout value in handleClick.

5

On mobile, the flow launches in a full-screen panel but the Cancel button does not dismiss it

hideFlowBox is wired to the Cancel button. Confirm the button's onclick is intact and no parent element is intercepting the click event.


8 — Real-Time Refresh Not Working (Platform Events)

Symptom: After an external action fires the Activity_UI_Event__e platform event, the timeline does not refresh automatically.

The component subscribes to /event/Activity_UI_Event__e using the EMP API. It filters by cm_activity__Parent_Record_Id__c matching the current recordId, and handles two event types: Close And Refresh and Refresh.

#

Check

Fix

1

User does not have Subscribe access to the platform event

Setup → Platform EventsActivity_UI_Event__e → check profiles with Subscribe access → add the user's profile.

2

Namespace prefix has changed or differs from cm_activity__

The component reads payload.cm_activity__Parent_Record_Id__c. If the package namespace is different in this org, the field names will not match. Verify the platform event field names in Setup → Platform Events → Activity_UI_Event__e → Fields.

3

EMP API subscription failed silently

Open browser console. onError logs to console.error('EMP API error:', ...). If this appears, the subscription was rejected — usually a permission or channel-not-found issue.

4

Event fires but parentId !== recordId

The Apex process firing the event must populate cm_activity__Parent_Record_Id__c with the exact same record ID as the page context.

5

Close And Refresh has a 2-second delay by design

This is intentional — the component waits 2 seconds before hiding the flow modal and refreshing. No action needed.


9 — Mobile Display Issues

Symptom: On a mobile device or narrow viewport, the layout is broken, buttons are icon-only, or flow modals fill the screen unexpectedly.

Symptom

Cause

Fix

Button labels disappear

showLabelsForButtons returns false when componentWidth ≤ 520px. This is by design to prevent overflow on small screens. No fix needed unless the breakpoint should be adjusted.

Modify MOBILE_BREAKPOINT or the 520 threshold in the component JS as needed.

Flow button launches in full-screen panel instead of a modal

useFlowModalView is false when isMobile is true (screen width ≤ 600px). On mobile, flows render in a panel. This is intended behavior.

No fix needed. If the client wants modal on all screen sizes, set useFlowModalView to always return true.

Action modals (Task/Event/Note) show a slide-up panel on mobile instead of a centered modal

activityActionModal also checks isMobile and switches to a panel view. Intended behavior.

If modal-only behavior is required, modify useModalView in activityActionModal.js.

Resize does not reflow the component

handleResize event listener fires on window. If the Visualforce or Experience Cloud container does not propagate resize events, componentWidth may be stale.

Manually trigger a resize by calling updateWidth from renderedCallback — already done — so a full page refresh will resolve it.


10 — Save / Delete Errors on Activities

Symptom: Clicking Save on a task, event, or note shows an error toast, or Delete fails.

The parseErrorMessage method strips the Salesforce APEX DML error wrapper and surfaces the inner message. The toast will show the cleaned-up error. Look at the exact toast text for the specific cause.

Error Text Pattern

Cause

Fix

REQUIRED_FIELD_MISSING

A field marked required in the org (not just the schema) is not being sent

Check the Default_Schema_Model for the action — ensure the required field has a fieldAPIName entry and a corresponding form field.

FIELD_CUSTOM_VALIDATION_EXCEPTION

A Salesforce validation rule on Task, Event, or ContentNote failed

Review Setup → Object Manager → Task/Event → Validation Rules. The rule may need a cmEngageHub bypass.

INSUFFICIENT_ACCESS_OR_READONLY

The user does not have Edit access to Task, Event, or ContentNote

Review the user's profile object permissions for Task, Event, and ContentNote.

INVALID_CROSS_REFERENCE_KEY on WhoId or WhatId

The record lookup returned a record ID of an object not allowed in WhoId/WhatId

Check Setup → Activities Settings to ensure the allowed related objects match the whoObjects and whatObjects lists in Activity_Record_Configuration.

Failed to fetch task/event/note details toast on Edit

getTaskDetails / getEventDetails / getNoteDetails Apex call failed — usually because the lstFields array contains a field API name that does not exist

Verify every fieldAPIName in the Default_Schema_Model "Edit Task" / "Edit Event" / "Edit Note" schema maps to a real field on the object.

Delete toast: [object Object]

deleteActivity threw an error that was not a standard DML exception

Check browser console for the raw error from the deleteActivity Apex call. Likely a sharing or trigger issue on the record.


11 — Expand All / Collapse All / View All Not Responding

Symptom: Clicking Expand All, Collapse All, or View All / View Less has no visible effect.

These controls call @api methods (expandActivityTimeline, toggleViewAllActivities) on the c-activity-record-logs child component via this.template.querySelector. If the child component has not rendered yet (e.g., still loading), the reference is null and the call is silently ignored.

Cause

Fix

Timeline is still loading when button is clicked

Wait for the loading spinner to disappear before clicking these controls.

c-activity-record-logs failed to render due to an error

Check browser console for errors in ActivityTimeline / ActivityRecordLogs. The parent component references the child by the selector c-activity-record-logs — if the child is absent from DOM, the call is no-op.

Expand All works but nothing expands visually

expandActivityTimeline maps over upcomingAndOverdue.activities and pastActivities. If both are empty after filtering, the toggle has nothing to operate on — expected behavior. Verify activities are visible in the timeline first.


12 — Custom Metadata Configuration Errors

Symptom: After updating a custom metadata record, the panel behaves unexpectedly or shows errors.

All four Activity_Panel_Configuration records store configuration as raw JSON strings in Value__c. Any JSON syntax error causes the Apex wrapper to return isSuccess: false with the parse exception message.

How to Validate Configuration JSON Before Saving

  1. Copy the Value__c content into a JSON validator (e.g., http://jsonlint.com or VS Code with Prettier).

  2. Fix any trailing commas, mismatched brackets, or unescaped characters.

  3. Save the metadata record.

  4. Hard-refresh the Salesforce page (Ctrl+Shift+R) to bypass LWC cache.

Common JSON Errors per Record

Metadata Record

Common Mistake

Activity_Buttons_Configuration

Missing buttonMapping key at root level; order field is a string instead of a number; isDropdown is a string "true" instead of boolean true

Default_Activity_Filters

Missing options or selectedValues keys; activityTypeOptions entries must be objects with label and value keys, not plain strings

Default_Schema_Model

Action key does not exactly match what the component expects (e.g., "New task" instead of "New Task"); fields array is missing when the modal needs fields

Activity_Record_Configuration

objectConfig key missing or the object API name does not match exactly (case-sensitive); childConfig entry missing required sObjectName or relationField

Clearing the LWC Cache After a Metadata Change

Custom metadata values are fetched at component load time via @wire and async Apex calls. After updating a metadata record:

  1. Open the record page in a new browser tab (not a refresh) to force a fresh component lifecycle.

  2. If the issue persists, append ?disableCache=1 to the page URL in Experience Cloud, or use Setup → Session Settings → Clear All Caches for persistent org-level cache issues.


Quick Reference — Apex Methods and Their Failure Impact

Apex Method

Component

Failure Impact

ActivityPanelController.getMetadataValue

activityPanel

Red error banner; buttons and timeline hidden

ActivityPanelController.getUserAndCurrentRecord

activityPanel

who, what, user not pre-populated in modals; "My activities" filter always empty

ActivityPanelController.getObjects / getWhatObjects

activityPanel

Lookup fields in modals fall back to hardcoded defaults (Account, Contact, User)

ActivityRecordLogsController.getSchema

activityPanel

schemaToUse is undefined; modal fields fail to render

ActivityRecordLogsController.getActivityRecordConfigs

activityRecordLogs

Timeline loads nothing; no error shown to user

ActivityRecordLogsController.getCurrentAndParentActivities

activityRecordLogs

Activities from current/parent records missing

ActivityRecordLogsController.getChildActivities

activityRecordLogs

Child record activities missing from timeline

ActivityUtils.getPicklistValue

activityActionModal

Combobox fields render empty; user cannot select a value

ActivityUtils.getDependentPicklistValues

activityActionModal

Dependent picklist renders empty and is disabled


Support Escalation

If the above steps do not resolve the issue, collect the following before escalating to CloudMaven support:

  1. Browser console logs (F12 → Console) from the moment the issue occurs

  2. Network tab — XHR calls to aura or lwc endpoints and their response payloads

  3. Exact text of any error toast or banner message

  4. Custom Metadata record contents — copy the Value__c from all four Activity_Panel_Configuration records

  5. User profile name and the list of assigned permission sets

Contact: support@cloudmaven.com