Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Object Functions
Property values can be accessed directly or by using a generic set or get
method.
- A get function for each field in the object. For example, an Account object has a get("Name") function. This can be used instead of object.Field (for example, account.Name).
- A set function for each field in the object. For example, an Account object has a set("Name) function. This can be used instead of object.Field = value.
Examples
For example, you can get the value of the Name field from an Account using either of these methods:
- account.get("Name")
- account.Name
- account["Name"]
You can set the value of the Name field from an Account using either of these methods:
- account.set("Name", "MyAccount");
- account.Name = "MyAccount";
- account["Name"]="MyAccount";