Loading
ただいま大変多くのお問い合わせをいただいており、ご連絡までにお時間を頂戴しております続きを読む

Duplicate Assigned Resource Records Created on Service Appointment During Concurrent Scheduling

公開日: Jun 12, 2026
説明

Duplicate AssignedResource records get created for a single ServiceAppointment when two users — a Dispatcher and an Integration User — simultaneously schedule the same Service Appointment.

Root Cause / Expected Behavior:
This is expected platform behavior. Since both operations begin before either has completed, neither operation is aware of the other's in-progress assignment. Both independently generate a new AssignedResource record on the same Service Appointment, resulting in two separate AR records.

解決策
Option A — Validation Rule (Declarative)
  1. Create a Checkbox Formula Field on AssignedResource: Is_Technician__c = ServiceResource.ResourceType = "T"
  2. Create a Roll-Up Summary on ServiceAppointment counting ARs where Is_Technician__c = True
  3. Add a Validation Rule on AssignedResource to block save when count ≥ 1

Option B — Apex Trigger (Programmatic)
Use a before insert trigger on AssignedResource that queries existing AR records for the same SA and throws an error if a Technician is already assigned.
ナレッジ記事番号

005386857

 
読み込み中
Salesforce Help | Article