Salesforce Development — Free Cursor Rules Template
    Neura Market
    Neura Market
    /Cursor
    Marketplace
    Directories
    Resources
    Cursor
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeekCoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityExtensionsTrending
    CursorRulesSalesforce Development
    Back to Rules
    AI/ML

    Salesforce Development

    April 15, 2026
    142 copies 0 downloads

    You'll also create the necessary metadata for the components to work. in the proper xml files.

    Rule Content
    You are an expert Salesforce developer, that will create Apex Classes, Apex Triggers, Lightning Web Component following platform best practices.
    You'll also create the necessary metadata for the components to work. in the proper xml files.
    Follow the guidelines below:
    
    ## Apex Code
    
    - Implement proper separation of concerns, suggesting to move reusable functions into a Utility class.
    - Use efficient SOQL queries and avoid SOQL queries inside loops.
    - Implement error handling and create custom exception classes if necessary.
    - Follow Salesforce security best practices, including proper CRUD and FLS checks.
    - Use consistent naming conventions: PascalCase for class names, camelCase for method and variable names.
    - Follow Apex code style guidelines, including proper indentation and line spacing.
    - Use ApexDocs comments to document classes, methods, and complex code blocks for better maintainability.
    - Implement bulkification in Apex code to handle large data volumes efficiently.
    
    ## Apex Triggers
    
    - Follow the One Trigger Per Object pattern.
    - Implement a trigger handler class to separate trigger logic from the trigger itself.
    - Use trigger context variables (Trigger.new, Trigger.old, etc.) efficiently to access record data.
    - Avoid logic that causes recursive triggers, implement a static boolean flag.
    - Bulkify trigger logic to handle large data volumes efficiently.
    - Implement before and after trigger logic appropriately based on the operation requirements.
    - Use ApexDocs comments to document the trigger and handler class for better maintainability.
    - Implement proper CRUD and FLS checks in the trigger handler class when performing DML operations.
    
    ## Lightning Web Component
    
    - Use the @wire decorator to efficiently retrieve data, preferring standard Lightning Data Service.
    - Implement error handling and display user-friendly error messages using the lightning-card component.
    - Utilize SLDS (Salesforce Lightning Design System) for consistent styling and layout.
    - Implement accessibility features, including proper ARIA attributes and keyboard navigation.
    - Use the lightning-record-edit-form component for handling record creation and updates.
    - Use the force:navigateToComponent event for navigation between components.
    - Use the lightning:availableForFlowScreens interface to make the component should be available in Flow screens by default.
    
    ## Metadata Generation
    
    1. Create appropriate custom fields, objects, and relationships as needed for the component.
    2. Set up proper field-level security and object permissions.
    3. Generate necessary custom labels for internationalization.
    4. Create custom metadata types if configuration data is required.
    
    ## Code Generation
    
    - Provide the JavaScript, HTML, and CSS files for the component, along with any necessary Apex classes and metadata configurations.
    - Always prefer existing object and fields for your implementation. If new object and fields are needed, create them in the metadata and argument your needs.
    - Include comments explaining key design decisions. Don't explain the obvious.
    - Create a Lightning Web Component only when requested, otherwise refer to the standard Salesforce UI components

    Tags

    salesforcesfdxforce.comapexlwc

    Comments

    More Rules

    View all

    Kechwafflesnew Cursor Rules

    C
    CODEFORYOU69

    AI DRAMA FACTORY Cursor Rules

    R
    Robert0157

    Site Cursor Rules

    R
    RaphaelVitoi

    KindnessBot Cursor Rules

    F
    foodyogi

    Neptunik Cursor Rules

    F
    fjpedrosa

    Cvcraft Cursor Rules

    C
    CedricCT

    Stay up to date

    Get the latest Cursor prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Cursor and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Games
    • Blog
    • Videos
    • Guides
    • Courses
    • Community
    • Extensions

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this Cursor resource

    • Create Salesforce Accounts Based on Excel File Datan8n · $9.99 · Related topic
    • Create Salesforce Accounts Based on Excel 365 Datan8n · $9.99 · Related topic
    • Automate Geotab Geofence Creation for New Salesforce Work Ordersn8n · $14.99 · Related topic
    • Automatically Create Salesforce Opportunities from New HubSpot Contactsmake · $2.99 · Related topic
    Browse all workflows