Skip to content

Kartikpatkar/salesforce-metadata-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ Salesforce Metadata Exporter – Package XML Generator & Metadata Explorer

License: MIT Version Chrome Extension Salesforce

Tagline: Explore, select, and export Salesforce metadata with precision β€” visually, securely, and effortlessly.


✨ Overview

Salesforce Metadata Exporter is a modern, developer-focused Chrome Extension that helps you browse Salesforce org metadata, generate deployment-ready package.xml files, and export metadata as ZIP packages without manual XML writing or external tools.

Built for Salesforce developers and administrators who frequently work with:

  • Metadata deployments
  • Partial deployments
  • CI/CD preparation
  • Sandbox β†’ Production releases
  • Multi-org environments
  • Metadata backup and migration

The extension focuses on accuracy, speed, and clarity, using Salesforce Tooling API and Metadata API directly β€” no scraping, no middleware, no credential storage.


πŸš€ Key Features

πŸ” Salesforce Org Detection & Authentication

  • Automatically detects the currently active Salesforce org
  • Supports:
    • Production
    • Sandbox
    • Developer Edition
    • Scratch Orgs
  • Uses existing Salesforce browser session
  • No OAuth setup
  • No credentials stored
  • Real-time connection status indicator
  • Easy org switching

🧩 Metadata Type Explorer

  • Displays a searchable list of Salesforce metadata types
  • Dynamically loads metadata types from the connected org
  • Intelligent fallback to default metadata list if API discovery fails
  • Quick search and filter capabilities
  • Commonly supported types include:
    • ApexClass
    • ApexTrigger
    • ApexPage
    • ApexComponent
    • CustomObject
    • CustomField
    • Layout
    • Profile
    • PermissionSet
    • Flow
    • CustomMetadata
    • CustomLabel
    • Workflow
    • ValidationRule
    • RecordType
    • And many more...

πŸ“‚ Metadata Component Viewer

  • Click any metadata type to view actual components present in the org
  • Uses the correct Salesforce API per metadata type:
    • Tooling API for Apex metadata
    • Metadata API (listMetadata) for configuration metadata
  • Displays real-time component count with badges
  • Search within components for quick filtering
  • Expandable/collapsible component lists
  • Gracefully handles:
    • Empty metadata
    • Unsupported metadata types
    • API errors

β˜‘οΈ Fine-Grained Selection

  • Select individual metadata components or use wildcards
  • "Select All" / "Clear All" support per metadata type
  • Mark members for deletion β€” click the πŸ—‘οΈ trash icon to add a component to the destructiveChanges.xml manifest instead of retrieving it
  • Member rows show colour-coded state: blue border = retrieve, red border = delete
  • Global preset filters:
    • Select All Metadata
    • Clear All Selections
  • Preset Manager β€” save and reload named selection presets stored in Chrome Storage
  • Search within metadata components
  • Global member search β€” search across all loaded member lists at once using the Members search mode
  • Visual member count badges (shows N (+) for retrieve, N (-) for deletion)
  • Selected metadata types persist across sessions using Chrome Storage
  • On extension open, selected types default to all members (*) for consistent preview/export behavior

πŸ“¦ Smart package.xml + destructiveChanges.xml Generator

  • Generates valid Salesforce package.xml for retrieval
  • Generates destructiveChanges.xml for deletion manifests β€” mark individual members for deletion using the trash icon
  • Dual preview tabs:
    • πŸ“„ package.xml β€” live retrieval manifest
    • πŸ—‘οΈ destructiveChanges.xml β€” live deletion manifest
  • Import existing package.xml with multiple options:
    • Upload from file - Select package.xml file from disk
    • Paste from clipboard - Copy package.xml content and paste directly
    • Automatic parsing and validation
    • Smart handling of metadata types not available in current org
    • Preserves wildcard (*) and specific member selections
    • Auto-expands types with specific members for verification
  • Supports:
    • Full wildcard deployment (<members>*</members>)
    • Partial deployments (specific components only)
  • Live package.xml preview with syntax highlighting
  • Copy to clipboard with one click
  • Automatically updates as selections change
  • Configurable Salesforce API version (v59.0)
  • Export metadata as downloadable ZIP package β€” if deletions are marked, destructiveChanges.xml is automatically injected alongside package.xml inside the ZIP
  • Export progress shown via a persistent toast that stays visible and updates during long exports (includes elapsed time)
  • Export timeout is configurable in the Org/Profile modal (default: 30 minutes)
  • Stop Export β€” cancel a running export mid-way using the Stop button

⚠️ Important: Exporting with destructiveChanges.xml does not delete anything from your org. The manifest only takes effect when the ZIP is deployed to a Salesforce org using CLI, Ant, or Workbench.


🎨 Clean & Developer-Friendly UI

  • Modern two-column layout:
    • Left: Metadata Types Selection
    • Right: Package XML Preview
  • Responsive design
  • Dark / Light theme toggle with persistent preferences
  • Clean footer with social links
  • Toast notifications for actions, errors, and export progress (no blocking alert popups)
  • Designed for daily Salesforce development workflows
  • Smooth animations and transitions

πŸŒ“ Theme Support

  • Light Mode: Clean, modern interface with gradient backgrounds
  • Dark Mode: Eye-friendly dark theme for extended sessions
  • Instant theme switching
  • Theme preference saved automatically
  • All components fully styled for both modes

πŸ“Έ Screenshots

πŸ”· Light Mode

Light Mode - Main Page

Light Mode - Destructive Changes preview

Light Mode - Org/Profile Modal

Light Mode - Export Confirmation

πŸŒ‘ Dark Mode

Dark Mode - Main Page


πŸ›  Built With

  • HTML, CSS, JavaScript (Vanilla ES Modules)
  • Chrome Extensions API (Manifest V3)
  • Salesforce Tooling API
  • Salesforce Metadata API (SOAP)
  • Modular CSS Architecture (12 separate stylesheets)
  • Service Worker for background operations
  • Content scripts for session extraction
  • Message-driven architecture

πŸ“¦ Installation

🌐 Install from Chrome Web Store (Recommended)

πŸ“₯ Get it on Chrome Web Store

  1. Click the link above or visit the Chrome Web Store
  2. Click "Add to Chrome"
  3. Confirm the installation
  4. Navigate to any Salesforce org and click the extension icon

πŸ”§ Load Extension Manually (Developer Mode)

  1. Clone or Download this Repository

    git clone <repository-url>
    cd salesforce-metadata-exporter
  2. Open Chrome Extensions Page

    chrome://extensions/
    
  3. Enable Developer Mode

    • Toggle Developer mode (top-right corner)
  4. Click "Load unpacked"

    • Select the project root folder (contains manifest.json)
  5. Done πŸŽ‰

    • Navigate to any Salesforce org
    • Click the extension icon to open the exporter

βœ… Works with existing Salesforce login βœ… No external servers βœ… No data stored outside the browser βœ… Supports multiple orgs


🎯 How to Use

  1. Login to Salesforce

    • Open any Salesforce org in Chrome
    • Login as you normally would
  2. Open the Extension

    • Click the extension icon
    • Click "Login to Production" or "Login to Sandbox"
  3. Select Metadata Types

    • Option A: Manual Selection
      • Browse available metadata types
      • Click to expand and view components
      • Select individual components or use wildcards
      • Use "Select All" / "Clear" buttons for quick actions
    • Option B: Import from existing package.xml πŸ“€
      • Upload: Click "Upload" button in preview section β†’ Select package.xml file
      • Paste: Copy package.xml content β†’ Click "Paste" button
      • Components will be auto-selected based on the content
      • Review and modify selections as needed
  4. Preview Package XML

    • View the live preview of package.xml or destructiveChanges.xml via the tab switcher
    • The πŸ—‘οΈ destructiveChanges.xml tab shows which components will be deleted on deploy
    • Click "Copy" button to copy the active manifest to clipboard
  5. Export Metadata

    • Click "Export Metadata"
    • If destructive members exist, a confirmation dialog appears β€” review the deletion list and click "Continue Export"
    • Monitor progress in the top-right persistent toast (updates + elapsed time)
    • Click "Stop Export" to cancel a running export at any time
    • Optional: adjust Export Timeout (Minutes) in the Org/Profile modal if needed
    • Download completes automatically β€” the ZIP will contain both package.xml and destructiveChanges.xml if deletions were marked

πŸ’‘ To actually delete components: deploy the downloaded ZIP to a Salesforce org using Salesforce CLI (sf project deploy start), Ant Migration Tool, or Workbench.


πŸ§ͺ Current Capabilities

βœ… Salesforce org auto-detection βœ… Production and Sandbox support βœ… Metadata type discovery βœ… Metadata component listing (Tooling API + Metadata API) βœ… Individual member selection βœ… Partial & full package.xml generation βœ… destructiveChanges.xml generation (mark members for deletion; auto-injected into exported ZIP) βœ… Preset Manager (save/load named selection presets) βœ… Global member search (search across all loaded member lists) βœ… Stop Export (cancel a running export mid-flight) βœ… Profile & Permission Set Downsizing (strip unwanted XML sections before download) βœ… Live XML preview with syntax highlighting βœ… Copy to clipboard functionality βœ… ZIP export with Metadata API retrieve() βœ… Export progress tracking via persistent updating toast βœ… Saved metadata type selections (members default to * on open) βœ… Dark / light theme toggle βœ… Clear search buttons βœ… Member count badges (retrieve + delete counts) βœ… Responsive design βœ… Modern modular CSS architecture


πŸ›£οΈ Roadmap (Planned Enhancements)

  • πŸ“¦ Enhanced ZIP content preview
  • πŸ‘€ Profile & PermissionSet sub-component selection (beyond downsizing)
  • πŸ”„ Org-to-org metadata comparison
  • πŸ“Š Metadata dependency visualization
  • 🏷️ Custom metadata type grouping
  • ⚑ Batch export optimization
  • πŸ”” Export completion notifications

πŸ” Security & Privacy

Security Principles

  1. No Credential Storage: Never stores username, password, or security tokens
  2. Session-Based Auth: Uses existing logged-in session only
  3. Manual Trigger: All exports require explicit user action
  4. Minimal Permissions: Only requests necessary Chrome permissions
  5. HTTPS Only: All Salesforce API calls use HTTPS
  6. No External Servers: All processing happens client-side
  7. Open Source: Full transparency, audit-friendly code

Chrome Permissions

Permission Justification
storage Save user preferences (theme, selections, export timeout)
downloads Trigger ZIP file download
activeTab Access current Salesforce tab for org detection
cookies Extract Salesforce session cookies for authenticated API calls
Host permissions (*.salesforce.com) Communicate with Salesforce APIs

🀝 Contributing

Contributions, bug reports, and feature requests are welcome!

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please keep changes modular and follow the existing code structure.


πŸ“š Resources

Project Documentation

Salesforce Documentation

Chrome Extension Documentation


🀝 Contributing

Contributions, bug reports, and feature requests are welcome!

  • Fork the repository
  • Create a feature branch
  • Submit a pull request

Please keep changes modular and follow the existing code structure.


🧠 Author

Built by Kartik Patkar Salesforce Developer β€’ Chrome Extension Builder


πŸ“œ License

This project is licensed under the MIT License β€” free to use, modify, and distribute.


Salesforce Metadata Exporter β€” because deployments should be precise, fast, and stress-free πŸš€


About

A Chrome Extension that lets Salesforce developers export Salesforce metadata only from a logged-in org as a ZIP file using the Metadata API.

Topics

Resources

License

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors