myb-p-create-update-reportslisted
Install: claude install-skill AviMYB/mybusiness-plugins
# MyBusiness CRM - Reports & Queries Builder
Build reports (shown on the Reports page) and queries (filtered views on entity pages like Sales, Accounts, Cases) in the MyBusiness CRM platform.
## Two Types of Data Views
**Reports** live on `apps/mybusiness/reports` and show cross-cutting organizational data - like "all sales by month" or "open cases by type". They're standalone analytical views.
**Queries** live on entity pages (`apps/mybusiness/sales`, `apps/mybusiness/accounts`, etc.) and act as saved filters/views - like "my open tasks this week" or "active accounts by city". They appear in the query dropdown on that page.
Both are stored in the `_DynamicQueries` table and use the same `Create-or-Update-Report` tool. The difference is where they appear (PageName/PageId) and whether they have a FormName.
## Workflow
### Step 1: Understand What the User Needs
Ask (in Hebrew):
- What data do they want to see? (sales, cases, accounts, tasks, activities, etc.)
- Is this a report (Reports page) or a query (on a specific entity page)?
- Do they need raw data or aggregated summaries?
- What filters should be available?
- Who should have access?
### Step 2: Get Schema and Optional Fields
Before building any report, always run these two tools:
1. **Get-Schema** with the target className - understand the table structure, field types, and pointer relationships
2. **Get-Optional-Fields** with the target className - get the exact field/aggrField/type/text values the system exp