Required fields must have a non-null value. This
rule affects the create() and update() calls:
- When a client application invokes the create() call, Salesforce.com automatically
populates the data for certain required fields (such as system fields
and the object ID fields). Similarly, if a required field has a default
value (its defaultedOnCreate attribute is set
to true, as described in Field, then Salesforce.com implicitly
assigns a value for this field when the object is created, even if
a value for this field is not explicitly passed in on the create() call. For all other required fields, such as ID fields
that are analogous to foreign keys in SQL (see Reference Field Type), a client application must explicitly assign a value when the object
is created (it cannot be null).
- When a client application invokes the update() call, a required field cannot be set to null. Many required fields cannot be changed in an update() call.
Any field not specified as required in the object description is
optional, that is, it can be null when updated or
created.
For more information about the special handling of required fields
for particular objects, see the documentation for such objects later
in this topic.