No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
Resource File for Apex
Marks a record with a custom error message and prevents any DML operation from occurring.
The error message to mark the record with.
When used on Trigger.new in before insert and before update triggers, and on Trigger.old in before delete triggers, the error message is displayed in the application interface.
When used in Visualforce controllers, the generated message is added to the collection of errors for the page. For more information, see Validation Rules and Standard Controllers in the Visualforce Developer's Guide.
Marks a record with a custom error message, specifies whether or not the error message should be escaped, and prevents any DML operation from occurring.
Indicates whether any HTML markup in the custom error message should be escaped (true) or not (false).
Be cautious if you specify false for the escape argument. Unescaped strings displayed in the Salesforce user interface can represent a vulnerability in the system because these strings might contain harmful code. If you want to include HTML markup in the error message, call this method with a false escape argument and make sure you escape any dynamic content, such as input field values.
An Exception object or a custom exception object that contains the error message to mark the record with.
- AES128
- AES192
- AES256
- toAddresses
- ccAddresses
- bccAddresses
- targetObjectId
- targetObjectIds
- cookie
- set-cookie
- set-cookie2
- content-length
- authorization
If the BCC compliance option is set at the organization level, the user cannot add BCC addresses on standard messages. The following error code is returned: BCC_NOT_ALLOWED_IF_BCC_ COMPLIANCE_ENABLED. Contact your salesforce.com representative for information on BCC compliance.
If no custom setting data is defined for the user, this method returns a new custom setting object. The new custom setting object contains an ID set to null and merged fields from higher in the hierarchy. You can add this new custom setting record for the user by using insert or upsert. If no custom setting data is defined in the hierarchy, the returned custom setting has empty fields, except for the SetupOwnerId field which contains the user ID.
If the transaction would cause the organization to exceed its daily email limit, using this method results in the following error: System.HandledException: The daily limit for the org would be exceeded by this request.
If the organization doesn’t have permission to send API or mass email, using this method results in the following error: System.NoAccessException: The organization is not permitted to send email.
The JSON content to deserialize.
The Apex type of the object that this method creates after deserializing the JSON content.
Deserializes the specified JSON string into an Apex object of the specified type.
The optional opt_allOrNone parameter specifies whether the operation allows partial success. If you specify false for this parameter and a record fails, the remainder of the DML operation can still succeed. This method returns a result object that can be used to verify which records succeeded, which failed, and why.
The optional opt_DMLOptions parameter specifies additional data for the transaction, such as assignment rule information or rollback behavior when errors occur during record insertions.
Set to false to return any errors encountered in this operation as part of the returned result. If set to true, this method throws an exception if the operation fails. The default is true.
- After an sObject is deleted using this method it cannot be undeleted.
- Only 10,000 sObjects can be specified for deletion.
- The logged-in user can delete any sObject that he or she can query in their Recycle Bin, or the recycle bins of any subordinates. If the logged-in user has “Modify All Data” permission, he or she can query and delete sObjects from any Recycle Bin in the organization.
- Do not include an sObject that was deleted due to a cascade delete; otherwise an error occurs. For example, if an account is deleted, all related contacts, opportunities, contracts, and so on are also deleted. Only include sObjects of the top level account. All related sObjects are automatically removed.
- Deleted items are added to the number of items processed by a DML statement, and the method call is added to the total number of DML statements issued. Each executed emptyRecycleBin method counts against the governor limit for DML statements.
The returned date is in the GMT time zone.
If the JSON content to parse contains attributes not present in the Apex type specified in the argument, such as a missing field or object, this method ignores these attributes and parses the rest of the JSON content. However, for Apex saved using Salesforce.com API version 24.0 or earlier, this method throws a run-time exception for missing attributes.
Log levels are cumulative. For example, if the lowest level, ERROR, is specified for Apex Code, only debug methods with the log level of ERROR are logged. If the next level, WARN, is specified, the debug log contains debug methods specified as either ERROR or WARN.
You can't use getQueryLocator with any query that contains an aggregate function.
The External_ID_Field is of type Schema.SObjectField, that is, a field token. Find the token for the field by using the fields special method. For example, Schema.SObjectField f = Account.Fields.MyExternalId.
The length of privateKey must match the specified algorithm: 128 bits, 192 bits, or 256 bits, which is 16, 24, or 32 bytes, respectively. You can use a third-party application or the generateAesKey method to generate this key for you.
This method can be called when you know in advance how many addresses emails will be sent to as a result of the transaction.
You must specify a value for setTemplateId, setHtmlBody, or setPlainTextBody. Or, you can define both setHtmlBody and setPlainTextBody.
If the JSON content to parse contains attributes not present in the Apex type specified in the argument, such as a missing field or object, this method throws a run-time exception.