RecordResource Class
Contains constructors and properties to create a record object from field values of an order.
-
Learn more about the available constructors with the
RecordResourceclass. -
Learn more about the available properties with the
RecordResourceclass.
Learn more about the available constructors with the RecordResource class.
The RecordResource class includes these constructors.
-
RecordResource(type, method, id)
Creates an instance of the
RecordResourceclass to assign values to the fields of an order item by using the sObject type, API method, and order ID properties. -
Creates an instance of the
RecordResourceclass to assign the values to the fields of an order item by using the sObject type and API method properties.
Creates an instance of the RecordResource class to assign values to the fields of an order item by using the sObject type, API method, and order ID properties.
public RecordResource(Schema.SObjectType type, String method, Id id)
type
Type: Schema.SObjectType
Object that’s returned from the field describe result using the getReferenceTo() method or from the sObject describe result using the getSObjectType() method.
method
Type: String
Method for the API request, such as POST or PATCH.
id
Type: Id
ID of the order.
Creates an instance of the RecordResource class to assign the values to the fields of an order item by using the sObject type and API method properties.
public RecordResource(Schema.SObjectType type, String method)
type
Type: Schema.SObjectType
Object that’s returned from the field describe result using the getReferenceTo() method or from the sObject describe result using the getSObjectType() method.
method
Type: String
Method for the API request, such as POST or PATCH.
Learn more about the available properties with the RecordResource class.
The RecordResource class includes these properties.
-
Set the
fieldValuesproperty to assign values to the fields to update the order record. -
Set the
idproperty to assign the ID of the order record. -
Set the
methodproperty to specify the API request method, such as POST or PATCH. -
Set the
typeproperty to assign the object type that’s returned from the field describe result using thegetReferenceTo()method or from the sObject describe result using thegetSObjectType()method.
Set the fieldValues property to assign values to the fields to update the order record.
public Map<String,ANY> fieldValues {get; set;}
Type: List<Map<String,ANY>>
Set the id property to assign the ID of the order record.
public String id {get; set;}
Type: String
Set the method property to specify the API request method, such as POST or PATCH.
public String method {get; set;}
Type: String
Set the type property to assign the object type that’s returned from the field describe result using the getReferenceTo() method or from the sObject describe result using the getSObjectType() method.
public Schema.SObjectType type {get; set;}
Type: Schema.SObjectType