PROC_UpdateFields.FieldUpdateMethod
Class · Group: Bulk DML
global enum PROC_UpdateFields.FieldUpdateMethodEnum defining methods for updating SObject fields.
Inner Classes
| Class | Description |
|---|---|
| COPY_FROM_FIELD | Copies another field of the same row into the field. |
| PREFIX | Prepends the provided value to the current field value. |
| REPLACE | The new value is written as it is and the current value is not kept, so a null value clears the field. |
| SUFFIX | Appends the provided value to the current field value. |
Value Details
COPY_FROM_FIELD
global COPY_FROM_FIELDCopies another field of the same row into the field. Here the value is not written itself: it is the API name of the field to copy from, the source field. Each row gets its own source value. The field must be able to take the source value: when Salesforce will not put the source value into the field, for example a decimal number into a whole number field, the error stops the whole chunk of rows and none of them is saved. UTIL_BulkUpdates.copyField refuses such pairs before it starts the job. Field lengths are not checked: a value too long for the field fails its row when the row is saved.
PREFIX
global PREFIXPrepends the provided value to the current field value.
REPLACE
global REPLACEThe new value is written as it is and the current value is not kept, so a null value clears the field. This is the default.
SUFFIX
global SUFFIXAppends the provided value to the current field value.