Salesforce apex updateあるいはdeleteしたらDmlExceptionが出た

Posted by ExiaHuang on March 24, 2017

Salesforce apex updateあるいはdeleteしたらDmlExceptionが出た

1
2
3
First error: Update failed.
First exception on row 0 with id a08xxxxxxxxxxxxxxx; 
first error: ENTITY_IS_DELETED, entity is deleted: []

削除したオブジェクトは参照でできないから。

「ENTITY_IS_DELETED」なのどコードの意味は?

SFDC Developer Guide

You can’t reference an object that has been deleted. This status code occurs only in API version 10.0 and later. Previous releases of the API use INVALID_ID_FIELD for this error.