RecordResource Class
Contains constructors and properties to create a record object from the field values of a sales transaction.
-
Learn more about the available constructors with the RecordResource class.
-
Learn more about the available properties with the RecordResource class.
Learn more about the available constructors with the RecordResource class.
The RecordResource class has these constructors.
-
RecordResource(type, method, groupAction, criteria)
Creates an instance of the RecordResource class to assign values to the fields of a sales transaction by using the sObject type, API method, and sales transaction ID properties. Additionally, you can group order or quote line items based on a criteria by using the groupAction and criteria properties.
-
RecordResource(type, method, id)
Creates an instance of the RecordResource class to assign values to the fields of a sales transaction by using the sObject type, API method, and sales transaction ID properties.
-
Creates an instance of the RecordResource class to assign the values to the fields of a sales transaction by using the sObject type and API method properties.
Creates an instance of the RecordResource class to assign values to the fields of a sales transaction by using the sObject type, API method, and sales transaction ID properties. Additionally, you can group order or quote line items based on a criteria by using the groupAction and criteria properties.
public RecordResource(Schema.SObjectType type, String method, String groupAction, Map<String,ANY> criteria)
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, PATCH, or DELETE.
groupAction
Type: String
Action to group order or quote line items. Valid values are:
GroupByGroupUngroupGroupAllDeleteGroup
criteria
Type: Map<String,ANY>
Criteria to group order or quote line items. For example, group order or quote line items based on a monthly billing frequency.
Creates an instance of the RecordResource class to assign values to the fields of a sales transaction by using the sObject type, API method, and sales transaction 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, PATCH, or DELETE.
id
Type: Id
ID of the sales transaction, such as a quote or an order.
Creates an instance of the RecordResource class to assign the values to the fields of a sales transaction 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, PATCH, or DELETE.
Learn more about the available properties with the RecordResource class.
The RecordResource class includes these properties.
-
Set the criteria property to group order or quote line items. For example, group order or quote line items based on a monthly billing frequency.
-
Set the fieldValues property to assign values to the fields to update the sales transaction.
-
Set the groupAction property to group order or quote line items.
-
Set the id property to assign the ID of the sales transaction record.
-
Set the method property to specify the API request method, such as POST, PATCH, or DELETE.
-
Set the type property to assign the object type that’s returned from the field describe result by using the getReferenceTo() method or from the sObject describe result by using the getSObjectType() method.
Set the criteria property to group order or quote line items. For example, group order or quote line items based on a monthly billing frequency.
public Map<String,ANY> criteria {get; set;}
Type: Map<String,ANY>
Set the fieldValues property to assign values to the fields to update the sales transaction.
public Map<String,ANY> fieldValues {get; set;}
Type: ListMap<String,ANY>
Set the groupAction property to group order or quote line items.
You can group order or quote line items based on location, work types, or departments, if groups are enabled for your org. Groups provide a visualization of the products to view large quotes.
public String groupAction {get; set;}
Type: String
Valid values are:
GroupByGroupUngroupGroupAllDeleteGroup
Set the id property to assign the ID of the sales transaction record.
public String id {get; set;}
Type: String
Set the method property to specify the API request method, such as POST, PATCH, or DELETE.
public String method {get; set;}
Type: String
Set the type property to assign the object type that’s returned from the field describe result by using the getReferenceTo() method or from the sObject describe result by using the getSObjectType() method.
public Schema.SObjectType type {get; set;}
Type: Schema.SObjectType