danielkerridge/claude-code-power-platform-skills/dataverse-web-resources
Claude Code and agent skill by danielkerridge/claude-code-power-platform-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when creating, deploying, or managing Dataverse web resources for model-driven apps. Covers JavaScript form scripts (OnLoad, OnSave, OnChange events), HTML dashboard pages, CSS styling, image resources, navigation/side panes, ribbon/command bar customization, business process flow client API, and deployment via the Web API. Triggers on: "web resource", "javascript form", "form script", "html dashboard", "ribbon command", "onload event", "onchange event", "onsave event", "formContext", "Xrm.…
Install
npx vskill@latest install danielkerridge/claude-code-power-platform-skills/dataverse-web-resourcesSKILL.md
Dataverse Web Resources Skill
You are an expert in creating, deploying, and using Dataverse web resources within model-driven apps. Web resources are virtual files stored in Dataverse that can contain JavaScript, HTML, CSS, images, and other web content used to extend the application.
CRITICAL RULES
- Always use a publisher prefix namespace for web resource names (e.g.,
cnt_/js/formscript.js).
The forward slash creates a virtual folder structure.
- JavaScript must use the namespace pattern. Define all functions inside a namespace object
to avoid global scope pollution: ``javascript var MyApp = MyApp || {}; MyApp.FormScripts = { onLoad: function(executionContext) { ... } }; ``
- Always pass `executionContext` to form event handlers. Enable "Pass execution context
as first parameter" when registering. Then: var formContext = executionContext.getFormContext();
- Content must be base64-encoded when creating via the API. Use PowerShell's
[Convert]::ToBase64String() or equivalent.
- Always publish after creating/updating web resources. They remain in draft until published.
- 5MB size limit per web resource (configurable by org admin). Minify large JS/CSS.
- Always consult `resources/ux-decision-guide.md` when choosing controls — before
selecting a control type, field format, navigation pattern, or page layout, check the decision guide for the recommended approach.
- `Xrm` is NOT available in web resources loaded via MDA sitemap. Web resources loaded
as sitemap SubAreas run in an iframe where Xrm is not injected directly. Use this fallback chain: (1) Xrm.Utility.getGlobalContext(), (2) parent.Xrm.Utility.getGlobalContext(), (3) WhoAmI API call (GET /api/data/v9.2/WhoAmI) for user identity. Cache the result.
- Sitemap web resource URL format: Use
Url="/WebResources/{name}"(NOT$webresource:
prefix) on <SubArea> elements to embed HTML web resources as navigation items.
Quick Reference
| Operation | Method | Endpoint | |
|---|---|---|---|
| Create web resource | POST | /webresourceset | |
| Update web resource | PATCH | /webresourceset({id}) | |
| Delete web resource | DELETE | /webresourceset({id}) | |
| Add to solution | Action | AddSolutionComponent (ComponentType=61) | |
| Publish | Action | PublishXml |
Xrm Client API Quick Reference
| API | Purpose | Target | |
|---|---|---|---|
Xrm.App.sidePanes.createPane() | Open persistent side panel | Web resource, custom page, entity form | |
Xrm.Navigation.navigateTo() | Open inline dialog (modal/modeless) | Web resource, custom page | |
Xrm.Navigation.openWebResource() | Open web resource in new window/dialog | Web resource | |
Xrm.Navigation.openForm() | Open entity form programmatically | Entity form | |
Xrm.Navigation.openAlertDialog() | Show alert message | System dialog | |
Xrm.Navigation.openConfirmDialog() | Show confirm/cancel prompt | System dialog | |
Xrm.WebApi.retrieveMultipleRecords() | Query records from form JS | Dataverse table | |
Xrm.WebApi.createRecord() | Create record from form JS | Dataverse table | |
Xrm.WebApi.updateRecord() | Update record from form JS | Dataverse table | |
Xrm.WebApi.deleteRecord() | Delete record from form JS | Dataverse table | |
formContext.data.process.getActiveProcess() | Get active BPF | Form process | |
formContext.data.process.setActiveProcess(id) | Switch BPF | Form process | |
formContext.data.process.moveNext() / movePrevious() | Navigate BPF stages | Form process | |
formContext.data.process.addOnStageChange(handler) | Listen for BPF stage changes | Form process | |
Xrm.Utility.getResourceString(webresource, key) | Get localized string from RESX | Web resource |
Resource Files
resources/types-reference.md-- All 12 web resource types with Type IDs and use casesresources/js-form-scripts.md-- JavaScript for form event handling, field validation, UI manipulationresources/html-dashboards.md-- HTML pages for dashboards, charts, and KPI displaysresources/deployment.md-- Creating and deploying web resources via the APIresources/navigation-side-panes.md-- Side panes, dialogs, navigation APIs (Xrm.App, Xrm.Navigation)resources/ribbon-command-bar.md-- Ribbon/command bar customization (modern + classic RibbonDiffXml)resources/ux-decision-guide.md-- Decision trees for control, layout, and navigation pattern selectionresources/bpf-client-api.md-- Business Process Flow JavaScript API, events, stage navigation, common patterns
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdataverse-web-resources/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/danielkerridge/claude-code-power-platform-skills/dataverse-web-resources)