Promotion.Record
This APEX class provides a wrapper to Promotion SObject Records. Each instance wraps an SObject Record related to the parent TPM_Promotion and provide methods to manipulate them in order to flag them for insertion or deletion. It also provides methods to extract the underlying SObject records so updates can be made.
The following are methods for TPM_Promotion.Record.
-
Indicates if the record is flagged for deletion or if it will be updated during save.
-
Indicates if the record is new or already exists in the database.
-
Returns the
temporary idfor the wrapped record. Promotion save process uses temporary id’s for records that are not still committed to the database. -
global SObject getOriginalRecord
Returns the original SObject record as stored in the database. If the record is new, this method returns null.
-
Returns the wrapped SObject record. The returned record field values can be updated.
-
Sets the fields passed in the map as fields for the wrapped SObject record. The
IsNewandIsDeletedfields will map to the isNew()and isDeleted()methods. If a key in the map is not an SObject field, it will be ignored. -
Sets the record to be deleted or to update the existing one.
-
Sets the record to be inserted as a new record or to update the existing one.
Indicates if the record is flagged for deletion or if it will be updated during save.
55
global Boolean isDeleted()
Indicates if the record is new or already exists in the database.
55
global Boolean isNew()
Returns the temporary id for the wrapped record. Promotion save process uses temporary id’s for records that are not still committed to the database.
55
global Id getId()
Returns the original SObject record as stored in the database. If the record is new, this method returns null.
55
global SObject getOriginalRecord()
Returns the wrapped SObject record. The returned record field values can be updated.
55
global SObject getRecord()
Sets the fields passed in the map as fields for the wrapped SObject record. The IsNew andIsDeletedfields will map to the is New() and is Deleted() methods. If a key in the map is not an SObject field, it will be ignored.
55
global void setFields(Map<String, Object> fieldValues)
Sets the record to be deleted or to update the existing one.
55
global void setIsDeleted(Boolean value)
Sets the record to be inserted as a new record or to update the existing one.
55
global void setIsNew(Boolean value)