create_widget
Generate a complete, production-ready Service Portal widget with HTML, CSS, client and server scripts, and option schema from a requirement description.
Instructions
Generate a complete, production-ready Service Portal widget from a requirement description.
Generates all 4 sections with best practices baked in:
HTML template: panel layout, loading/error states, AngularJS binding
CSS: theme-variable-based styling (no hardcoded colors)
Client script: c.data pattern, c.server.update(), spUtil feedback
Server script: try/catch, input dispatcher, GlideRecord with limit
Option schema: title + limit + any custom options
Returns deploy-ready payload + best practices + deploy instructions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Widget display name | |
| id | No | Widget ID (kebab-case, used in URL and as CSS class) | |
| description | No | ||
| data_source | No | Table to load data from (e.g. "incident") | |
| fields | No | ||
| actions | No | ||
| options | No |