sugar-viewdef-editing

Edit SugarCRM Sidecar viewdef PHP files with safe numeric array key management.

6|3|Updated Oct 27, 2025
One-click install
npx skills add https://github.com/sugarcrm-developers/ai-for-sugar-devs --skill sugar-viewdef-editing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sugar-viewdef-editing
Source: https://github.com/sugarcrm-developers/ai-for-sugar-devs/tree/main/skills/sugar-viewdef-editing
Command: npx skills add https://github.com/sugarcrm-developers/ai-for-sugar-devs --skill sugar-viewdef-editing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the challenge of safely editing existing SugarCRM Sidecar viewdefs, ensuring proper numeric array key management to avoid data corruption and compatibility issues.

Core Features & Use Cases

  • Safe Editing: Provides methods to safely edit record.php, list.php, subpanel-list.php, etc., without breaking the viewdef structure.
  • Array Key Management: Ensures that explicit numeric array keys remain contiguous and sorted to maintain compatibility with Sugar's metadata pipeline.
  • Error Handling: Offers techniques to fix corrupted viewdefs and recover from common editing mistakes.
  • Use Case: Ideal for Sugar developers who need to modify viewdefs and ensure that changes do not interfere with Sugar's Studio or other automated processes.

Quick Start

Use the sugar-viewdef-editing skill to renumber the array keys in the 'src/SugarModules/modules/Foos/clients/base/views/record/record.php' file.

Frequently Asked Questions about sugar-viewdef-editing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely edit SugarCRM Sidecar viewdefs without breaking the metadata structure?

To safely edit SugarCRM Sidecar viewdefs, use explicit numeric array key management to keep keys contiguous and sorted, preventing data corruption and maintaining compatibility with Sugar's metadata pipeline.

Why do my SugarCRM record.php viewdefs break after manual edits in PHP?

SugarCRM viewdefs break when explicit numeric array keys become non-contiguous or unsorted, which disrupts Sugar's metadata pipeline; enforcing contiguous, sorted array keys prevents this corruption and compatibility issues.

How do I renumber array keys in a SugarCRM viewdef PHP file?

Renumber array keys in a SugarCRM viewdef PHP file by applying explicit numeric array key management to ensure all keys remain contiguous and sorted, restoring compatibility with Sugar's Studio and automated processes.

Can I modify SugarCRM subpanel-list.php viewdefs without interfering with Studio?

Yes, you can modify subpanel-list.php viewdefs without interfering with Studio by using safe numeric array key management to maintain the structural integrity required by Sugar's metadata pipeline.

What is the best way to fix corrupted SugarCRM viewdefs after an editing mistake?

Fix corrupted SugarCRM viewdefs by renumbering the explicit numeric array keys to be contiguous and sorted, which recovers the file structure and restores compatibility with Sugar's metadata pipeline.