SalesOrder wrapped object with camel case properties. Each properties maps to a field on the SObject that has _ for each capital letter. Ex. (businessGroup -> Business_Group__c)
Maps To: OrderApi__Sales_Order__c
Sales Orders are the primary object for all sales related transactions.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| void | getInstance() |
| void | getInstance(OrderApi__Sales_Order__c so) |
| void | getInstance(OrderApi__Sales_Order__c[] sos) |
| void | SalesOrder() |
| void | fromSObject(SObject salesOrderObj) |
| void | toSObject() |
Method Detail
This class supports the following methods:
global static SalesOrder getInstance()
global static SalesOrder getInstance(OrderApi__Sales_Order__c so)
Parameters
| Name | Type | Description |
|---|---|---|
| so | OrderApi__Sales_Order__c | undefined |
global static SalesOrder[] getInstance(OrderApi__Sales_Order__c[] sos)
Parameters
| Name | Type | Description |
|---|---|---|
| sos | List<OrderApi__Sales_Order__c> | undefined |
global SalesOrder()
SalesOrderLine Constructor that should not be called directly.
global virtual override void fromSObject(SObject salesOrderObj)
Parameters
| Name | Type | Description |
|---|---|---|
| salesOrderObj | SObject | undefined |
global virtual override SObject toSObject()
Properties
| Name | Type | Description |
|---|---|---|
| lines | List |
|
| isMultiCurrencyOrg | Boolean | |
| paymentGateway | String | System Calculated The related payment gateway. |
| sourceCode | Id | System Calculated/Override Link to Source Code. |
| entity | String | Required Select "Account" if the related the account is responsible payment of the customer order, Select "Contact" if the related contact is responsible payment of the customer order. |
| businessGroup | Id | System Calculated/Override Link to the business group record - business groups will auto-populate if not defined on entry. |
| account | Id | System Calculated/Override Link to the customer's account record. Auto-populates with the related contact's parent account if not defined prior to entry. |
| contact | Id | System Calculated/Override Link to the customer's contact record. Auto-populates with the related account's primary contact if not defined prior to entry. |
| id | Id | |
| total | Decimal | System Calculated. Subtotal + |
| currencyISOCode | String | |
| paymentTerms | String | The payment terms for the sales order. If not defined on record creation the default terms defined in the admin settings are used. |
| invoiceDate | Date | System Calculated/Conditional/Override The date to use as the Invoice Date for any Invoice generated from the Sales Order only applies to Sales Orders where Is Scheduled is not set to true. |
| closedDate | Date | The date the Sales Order was closed. |
| status | String | The status of the Sales Order. |
| isPosted | Boolean | When checked all Invoices related to the Sales Order will post an receivable transaction to the GL. |
| isPendingPayment | Boolean | When checked, the related Sales Order is pending payment due to offsite payment or shippable items. |
| isClosed | Boolean | System Calculated/Override Checked when the Sales Order is closed. Sales Orders close automatically when paid in full by the customer, when a contract expires, or when a contract/recurring Sales Order is cancelled. |
| postingEntity | String | System Calculated/Override The entity the Sales Order posted too. Sales Orders either post through an Invoice(s) or through a single Receipt as a Cash Sale. |
| dueDate | Date | System Calculated Invoice Date field + Payment Term.Variable |
| name | String | |
| isProforma | Boolean | When this field is checked, this sales order will be displayed in the community. |
| receipt | Id |