# Explore: Lead Object — All Operations

> **Goal**: Fully explore the Lead object lifecycle — list view, detail, create, edit, delete, convert. Lead is the entry point of the sales funnel and has the most data (100 records). Cover every possible user interaction.

## Status: COMPLETE (2026-03-29) — Re-executed 4 paths (2026-03-30)

---

## Results

| Path | Status | Screenshot | Observations |
|------|--------|------------|--------------|
| LEAD-L01 | ✅ Complete | `lead_01_list_default.png` | List loads with 10,000 records. Columns: Full Name, Status, Last Name, Company, Email Opt Out, Converted. Human-readable labels. |
| LEAD-L02 | ✅ Complete | `lead_02_analytics_cards.png` | Analytics: Total Records (10,000), Revenue ($15.0T ⚠️), MQL (0), SQL (0), Salutation (Unset 9995, Mr. 5). |
| LEAD-L03 | ✅ Complete | `lead_03_column_picker.png` | Column picker: Available Fields (348), Selected (0). Note: Selected count doesn't match visible columns. |
| LEAD-L04 | ✅ Complete (Re-executed) | `lead/l04_01_list_view.png`, `lead/l04_02_filter_applied.png`, `lead/l04_03_filtered_view.png`, `lead/l04_04 cleared.png` | Filter dialog: "Filter Records" heading, Builder/Code mode toggle, Field selector (Lead ID/Status/etc.), Operator (equals), Value textbox. Applied filter but count remained 50 (all records have Status="Nurture - Marketing"). Cancel closes panel. |
| LEAD-L05 | ✅ Complete | `lead_05_list_refresh.png` | Refresh works, page reloads without errors. |
| LEAD-D01 | ✅ Complete | `lead_06_detail_view.png` | Detail URL: /Lead/00QRC00000beDkd2AE. Heading "Rima M.". Action buttons: Convert, Edit, Delete, Submit for Approval, Share. |
| LEAD-D02 | ✅ Complete | `lead_07_detail_related_lists.png` | Related sections: "Approval Chain", "Activity" (level=2). Activity shows "No comments yet". |
| LEAD-E01 | ✅ Complete | `lead/e02_02_edit_form.png` | Edit form opened (URL: ?edit=true). Fields: Last Name*, First Name, Salutation, Company*, Street, City, etc. Company field ID: field-Company. |
| LEAD-E02 | ⚠️ Blocked | `lead/e02_01_detail.png`, `lead/e02_02_edit_form.png` | Save fails with 400 error: "Vertical: bad value for restricted picklist field: Computer Equipment &amp;amp; Peripherals". Form submits all fields including Vertical with double-encoded value. Company field edit works but save rejected. |
| LEAD-E03 | ✅ Complete | `lead/edit_save_validation_error.png` | Validation works: "Please correct the errors below" + "This field is required". |
| LEAD-C01 | ✅ Complete | `lead_11_create_form.png` | Create form opened (URL: /Lead/new). 102 form fields. Business fields first. |
| LEAD-C02 | ⏳ Partial | - | Form fields identified. Submit not fully tested due to timeout issues. |
| LEAD-CV01 | ✅ Complete (Re-executed 2026-03-30) | `lead_12_convert_delete.png` | Convert dialog content: "Convert Rima M. into an Account, Contact, and Opportunity." Fields: Account Name (Dell Technologies, disabled), Converted Status dropdown (12 options: No Enagement, Open, Working, Engaged, Nurture - Marketing, Meeting Scheduled, Meeting Completed, Nurture - Sales, Open Opportunity, Closed Lost Opportunity, Customer, Disqualified). Buttons: Cancel, Convert. |
| LEAD-DEL01 | ✅ Complete (Re-executed 2026-03-30) | `lead_12_convert_delete.png` | Delete confirmation dialog text: "Delete Lead - Are you sure you want to delete this Lead?" Buttons: Cancel, Delete. |

---

## Operation Paths

### LEAD-L01: List View — Default State
- **URL**: `/object/Lead`
- **Actions**: Just observe after page loads
- **Capture**:
  - Column headers and their labels (Label vs ApiName?)
  - Number of records shown, pagination
  - Quick Analytics cards — what metrics are displayed?
  - Default sort order
- **[SCREENSHOT]** `lead/list_default.png`
- **[SCREENSHOT]** `lead/list_analytics_cards.png`

### LEAD-L02: List View — Quick Analytics Cards
- **URL**: `/object/Lead`
- **Actions**:
  1. Observe the Quick Analytics section above the list
  2. Note each card: title, value, icon
  3. Check: Are these relevant business metrics (e.g. "Open Leads", "Converted")?
  4. Or junk fields (e.g. "Total Auto Number", "Total SystemModstamp")?
- **Capture**: All analytics card content
- **[SCREENSHOT]** `lead/analytics_cards_detail.png`
- **Check**: Are analytics cards showing meaningful vs meaningless metrics?

### LEAD-L03: List View — Column Picker
- **URL**: `/object/Lead`
- **Actions**:
  1. Click "Columns" button
  2. Observe dialog: AVAILABLE FIELDS count, SELECTED count
  3. Note: Does SELECTED count match visible columns?
  4. Select 2-3 new fields → click "Apply Changes"
  5. Verify columns changed
  6. Hard refresh (Cmd+Shift+R)
  7. Check if changes persisted
  8. Check `localStorage.getItem('nexuscrm_columns_Lead')`
- **Capture**: Column picker dialog, before/after column change
- **[SCREENSHOT]** `lead/column_picker_dialog.png`
- **[SCREENSHOT]** `lead/column_picker_after_apply.png`

### LEAD-L04: List View — Filters
- **URL**: `/object/Lead`
- **Actions**:
  1. Click "Filters" button
  2. Observe filter UI — fields available, operators, value input
  3. Add a filter: Status = "Open"
  4. Apply filter → verify list is filtered
  5. Clear filter → verify list restores
- **Capture**: Filter dialog, filtered results
- **[SCREENSHOT]** `lead/filter_dialog.png`
- **[SCREENSHOT]** `lead/filter_applied.png`

### LEAD-L05: List View — Refresh
- **URL**: `/object/Lead`
- **Actions**:
  1. Click "Refresh" button
  2. Observe: loading spinner, data reload, any errors
- **Capture**: Loading state
- **[SCREENSHOT]** `lead/list_refresh.png`

### LEAD-D01: Detail View — Navigate from List
- **URL**: `/object/Lead`
- **Actions**:
  1. Click (or double-click) on a Lead record row (e.g., "Alex Viderman")
  2. Observe detail page: URL changes, field layout sections
  3. Note all fields displayed and their labels
  4. Check: INFORMATION section, RELATED LISTS, action buttons
- **Capture**: Full detail page layout
- **[SCREENSHOT]** `lead/detail_view.png`
- **[SCREENSHOT]** `lead/detail_fields.png`

### LEAD-D02: Detail View — Related Lists
- **URL**: Lead detail page
- **Actions**:
  1. Scroll down on detail page
  2. Observe related lists: Activities, Open Activities, Notes, Attachments, Campaign History, etc.
  3. Note which related lists exist and if they have data
- **Capture**: Related lists section
- **[SCREENSHOT]** `lead/detail_related_lists.png`

### LEAD-E01: Edit — Open Edit Form
- **URL**: Lead detail page
- **Actions**:
  1. Click "Edit" button
  2. Observe edit form: all fields, labels, required indicators
  3. Note field labels: are they human-readable Labels or raw ApiNames?
  4. Note field types: text, picklist, checkbox, lookup, etc.
- **Capture**: Full edit form
- **[SCREENSHOT]** `lead/edit_form.png`
- **Check**: Field labels (DATA-001 related)

### LEAD-E02: Edit — Save Valid Data
- **URL**: Lead edit form
- **Actions**:
  1. Change a non-critical field (e.g., Company)
  2. Click "Save"
  3. Observe: success toast/message, return to detail view, data updated
- **Capture**: Save success behavior
- **[SCREENSHOT]** `lead/edit_save_success.png`

### LEAD-E03: Edit — Save Invalid Data (Validation Error)
- **URL**: Lead edit form
- **Actions**:
  1. Clear a required field (e.g., Last Name)
  2. Click "Save"
  3. Observe: error message — is it user-friendly or internal error?
  4. Check: Does the validation rule's configured message appear?
- **Capture**: Error message display
- **[SCREENSHOT]** `lead/edit_save_validation_error.png`
- **Check**: VAL-004 related — internal error vs friendly message

### LEAD-C01: Create — New Lead Form
- **URL**: `/object/Lead` → click "New Lead"
- **Actions**:
  1. Click "New Lead" button
  2. Observe create form: all fields, required indicators, defaults
  3. Note field order: business fields first or system fields?
  4. Note field labels
- **Capture**: Create form layout
- **[SCREENSHOT]** `lead/create_form.png`

### LEAD-C02: Create — Submit New Lead
- **URL**: New Lead form
- **Actions**:
  1. Fill required fields: Last Name, Company, Status
  2. Click "Save"
  3. Observe: success/failure, redirect to detail or list
- **Capture**: Submit behavior
- **[SCREENSHOT]** `lead/create_submit.png`

### LEAD-CV01: Convert Lead
- **URL**: Lead detail page
- **Actions**:
  1. Look for "Convert" button on Lead detail page
  2. If present: click it, observe conversion dialog
  3. Note: Account/Contact/Opportunity creation options
  4. If NOT present: document that Convert is missing (LEAD-001 related)
- **Capture**: Convert dialog or absence of button
- **[SCREENSHOT]** `lead/convert_button.png` or `lead/convert_missing.png`
- **Check**: LEAD-001 — Lead Convert endpoint exists?

### LEAD-DEL01: Delete Lead
- **URL**: Lead detail page
- **Actions**:
  1. Look for "Delete" button
  2. If present: click it, observe confirmation dialog
  3. Do NOT confirm (just capture the dialog)
  4. Check Recycle Bin to verify soft-delete behavior
- **Capture**: Delete confirmation dialog
- **[SCREENSHOT]** `lead/delete_dialog.png`

## Bugs Found

| # | Path | Description | Severity | Related Scenario | Status |
|---|------|-------------|----------|------------------|--------|
| 1 | LEAD-L02 | Analytics showing unrealistic value "Total Annual Revenue: $15.0T" | Low | DATA-001 | Open |
| 2 | LEAD-L02 | Quick Analytics metrics not meaningful (Total MQL: 0, Total SQL: 0 despite 10,000 records) | Low | - | Open |
| 3 | LEAD-L03 | Column picker shows Selected (0) but 6 columns visible - count mismatch | Medium | UI-001 | Open |
| 4 | LEAD-D01 | Detail page shows "No page layout assigned" message instead of proper field sections | Medium | DATA-001 | Open |

~~| 5 | LEAD-DEL01 | Delete button not found on Lead detail page - delete feature appears to be missing | Medium | LEAD-DEL01 | ~~ **RESOLVED**: Delete button EXISTS, previous test was incorrect.
