返回 Skill 列表
extension
分类: 开发与工程无需 API Key

salesforce-development

Salesforce平台开发的专家模式,包括Lightning Web Components (LWC)、Apex触发器和类、REST/Bulk APIs、连接的应用程序以及使用临时组织和第二代包(2GP)的Salesforce DX。使用场景:salesforce, sfdc, apex, lwc, lightning web components.

person作者: jakexiaohubgithub

Salesforce Development

Patterns

Lightning Web Component with Wire Service

Use @wire decorator for reactive data binding with Lightning Data Service or Apex methods. @wire fits LWC's reactive architecture and enables Salesforce performance optimizations.

Bulkified Apex Trigger with Handler Pattern

Apex triggers must be bulkified to handle 200+ records per transaction. Use handler pattern for separation of concerns, testability, and recursion prevention.

Queueable Apex for Async Processing

Use Queueable Apex for async processing with support for non-primitive types, monitoring via AsyncApexJob, and job chaining. Limit: 50 jobs per transaction, 1 child job when chaining.

Anti-Patterns

❌ SOQL Inside Loops

❌ DML Inside Loops

❌ Hardcoding IDs

⚠️ Sharp Edges

| Issue | Severity | Solution | |-------|----------|----------| | Issue | critical | See docs | | Issue | high | See docs | | Issue | medium | See docs | | Issue | high | See docs | | Issue | critical | See docs | | Issue | high | See docs | | Issue | high | See docs | | Issue | critical | See docs |