salesforce-custom-object

Generate and validate Salesforce CustomObject metadata XML for deployments.

803|289|Updated Nov 7, 2025
One-click install
npx skills add https://github.com/forcedotcom/afv-library --skill salesforce-custom-object
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: salesforce-custom-object
Source: https://github.com/forcedotcom/afv-library/tree/main/skills/salesforce-custom-object
Command: npx skills add https://github.com/forcedotcom/afv-library --skill salesforce-custom-object

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating and validating Salesforce CustomObject metadata can be error-prone and deployment-sensitive. This skill automates generation of the required .object XML and enforces Salesforce constraints to prevent deploy-time failures.

Core Features & Use Cases

  • Generate mandatory elements (label, pluralLabel, sharingModel, deploymentStatus, nameField, visibility) to produce a deploy-ready CustomObject definition.
  • Enforce sharing model rules based on Master-Detail relationships, with automatic adjustments and validation warnings.
  • Validate constraints such as reserved words, XML root rules, and Master-Detail limits to avoid deployment errors.

Quick Start

Generate a compliant CustomObject XML for a new Salesforce object and validate its deployment readiness.

Frequently Asked Questions about salesforce-custom-object

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

FAQPage Schema
How do I generate a deploy-ready CustomObject metadata XML for Salesforce?

Generate a deploy-ready CustomObject metadata XML by automating mandatory elements like label, pluralLabel, sharingModel, deploymentStatus, nameField, and visibility. This ensures your Salesforce custom object definition meets all deployment requirements and passes validation checks without manual XML editing.

What causes CustomObject deployment failures related to sharingModel and Master-Detail relationships?

CustomObject deployment failures often occur when sharingModel rules conflict with Master-Detail relationship limits. The metadata validation process automatically adjusts sharing configurations and issues warnings to prevent deploy-time errors caused by invalid relationship constraints.

How do I validate Salesforce custom object XML against reserved words and root element rules?

Validate Salesforce custom object XML by checking constraints such as reserved words, XML root rules, and Master-Detail limits. Enforcing these constraints during metadata generation prevents deployment errors and ensures the .object XML file adheres to Salesforce platform requirements.

Does Salesforce metadata API support automated validation of custom object deployment readiness?

Salesforce metadata API deployment readiness is supported by validating required XML elements and enforcing platform constraints. This includes checking label configurations, sharing models, and visibility settings to ensure the custom object metadata is fully compliant before attempting deployment.

What are the limitations when configuring Master-Detail relationships in custom object metadata?

Configuring Master-Detail relationships in custom object metadata has limits on the number of relationships per object and specific sharingModel requirements. The validation process identifies these constraints and provides warnings to avoid deployment failures caused by exceeding relationship limits or invalid sharing configurations.