Loading

Duplicate Assigned Resource Records Created on Service Appointment During Concurrent Scheduling

Data pubblicazione: Jun 12, 2026
Descrizione

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.

Risoluzione
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.
Numero articolo Knowledge

005386857

 
Caricamento
Salesforce Help | Article