SODocument
Holds comprehensive data for Sales Order (SO) documents, capturing order status, contact details, addresses, and project linkages.
Table Specific Information
Insert
Insert is only supported when UseLegacy=True.
The following example illustrates how to insert into SODocument table:
INSERT INTO SODocument (docparid, datecreated, custvendid, datedue, vsoepricelist, itemaggregate) VALUES ('Sales Quote', '08/31/2024', '10036', '09/01/2024', 'MyPriceList', '<sotransitem><itemid>0001</itemid><warehouseid>WH1</warehouseid><quantity>1</quantity><unit>Each</unit><price>100</price><locationid>10</locationid></sotransitem>');
Columns
| Name | Type | ReadOnly | Description |
| Recordno [KEY] | String | False |
Unique record identifier for the SO document. |
| Docno | String | False |
Sales order document number for tracking and identification. |
| Docid | String | False |
System-generated unique identifier for the sales order document. |
| Createdfrom | String | False |
Indicates the source document from which this sales order was created. |
| State | String | False |
Current state or phase of the SO document. |
| Closed | Boolean | False |
Indicates whether the sales order is closed. |
| Whencreated | Datetime | False |
Timestamp indicating when the sales order was created. |
| Whenmodified | Datetime | False |
Timestamp of the last modification to the sales order. |
| Whendue | Datetime | False |
Due date for the completion or delivery of the sales order. |
| Status | String | False |
Current status of the sales order, such as Pending or Completed. |
| Ponumber | String | False |
Purchase Order number associated with the sales order. |
| Vendordocno | String | False |
Vendor's document number for cross-reference purposes. |
| Docparid | String | False |
Parent document identifier for hierarchical relationships. |
| Docparkey | String | False |
Parent document key for linking related records. |
| Docparclass | String | False |
Classification of the parent document. |
| Term_name | String | False |
Name of the payment or service terms associated with the sales order. |
| Note | String | False |
Additional notes or comments related to the sales order. |
| Warehouse_locationid | String | False |
Identifier for the warehouse location associated with the order. |
| Shipvia | String | False |
Preferred shipping method for the sales order. |
| User | String | False |
User associated with the sales order. |
| Createduser | String | False |
User who created the sales order. |
| Userid | String | False |
User identifier associated with the sales order. |
| Createduserid | String | False |
Identifier of the user who created the sales order. |
| Contact_contactname | String | False |
Name of the primary contact associated with the sales order. |
| Contact_prefix | String | False |
Prefix (e.g., Mr., Ms.) for the contact associated with the sales order. |
| Contact_firstname | String | False |
First name of the primary contact. |
| Contact_initial | String | False |
Middle initial of the primary contact. |
| Contact_lastname | String | False |
Last name of the primary contact. |
| Contact_companyname | String | False |
Company name of the primary contact. |
| Contact_printas | String | False |
Name formatting preference for printed documents. |
| Contact_phone1 | String | False |
Primary phone number of the contact associated with the sales order. |
| Contact_phone2 | String | False |
Secondary phone number of the contact associated with the sales order. |
| Contact_cellphone | String | False |
Cell phone number of the primary contact. |
| Contact_pager | String | False |
Pager number of the primary contact, if applicable. |
| Contact_fax | String | False |
Fax number associated with the primary contact. |
| Contact_email1 | String | False |
Primary email address of the contact associated with the sales order. |
| Contact_email2 | String | False |
Secondary email address of the contact associated with the sales order. |
| Contact_url1 | String | False |
Primary website or URL associated with the contact. |
| Contact_url2 | String | False |
Secondary website or URL associated with the contact. |
| Contact_visible | Boolean | False |
Indicates whether the contact is visible in system records. |
| Contact_mailaddress_address1 | String | False |
Primary address line 1 for mailing purposes. |
| Contact_mailaddress_address2 | String | False |
Primary address line 2 for mailing purposes. |
| Contact_mailaddress_city | String | False |
City for the contact's mailing address. |
| Contact_mailaddress_state | String | False |
State for the contact's mailing address. |
| Contact_mailaddress_zip | String | False |
Postal or ZIP code for the contact's mailing address. |
| Contact_mailaddress_country | String | False |
Country for the contact's mailing address. |
| Contact_mailaddress_countrycode | String | False |
Country code for the contact's mailing address. |
| Shiptokey | String | False |
Unique identifier for the shipping address associated with the sales order. |
| Shipto_contactname | String | False |
Contact name for the shipping address. |
| Shipto_prefix | String | False |
Prefix for the shipping contact (e.g., Mr., Ms.). |
| Shipto_firstname | String | False |
First name of the shipping contact. |
| Shipto_initial | String | False |
Middle initial of the shipping contact. |
| Shipto_lastname | String | False |
Last name of the shipping contact. |
| Shipto_companyname | String | False |
Company name associated with the shipping contact. |
| Shipto_printas | String | False |
Formatted name for printing purposes in the shipping address. |
| Shipto_phone1 | String | False |
Primary phone number for the shipping contact. |
| Shipto_phone2 | String | False |
Secondary phone number for the shipping contact. |
| Shipto_cellphone | String | False |
Cell phone number for the shipping contact. |
| Shipto_pager | String | False |
Pager number for the shipping contact, if applicable. |
| Shipto_fax | String | False |
Fax number associated with the shipping contact. |
| Shipto_email1 | String | False |
Primary email address for the shipping contact. |
| Shipto_email2 | String | False |
Secondary email address for the shipping contact. |
| Shipto_url1 | String | False |
Primary website or URL associated with the shipping contact. |
| Shipto_url2 | String | False |
Secondary website or URL associated with the shipping contact. |
| Shipto_visible | Boolean | False |
Indicates whether the shipping contact is visible in system records. |
| Shipto_mailaddress_address1 | String | False |
Primary address line 1 for the shipping location. |
| Shipto_mailaddress_address2 | String | False |
Primary address line 2 for the shipping location. |
| Shipto_mailaddress_city | String | False |
City for the shipping location's address. |
| Shipto_mailaddress_state | String | False |
State for the shipping location's address. |
| Shipto_mailaddress_zip | String | False |
Postal or ZIP code for the shipping location's address. |
| Shipto_mailaddress_country | String | False |
Country for the shipping location's address. |
| Shipto_mailaddress_countrycode | String | False |
Country code for the shipping location's address. |
| Billtokey | String | False |
Unique identifier for the billing address associated with the sales order. |
| Billto_contactname | String | False |
Contact name for the billing address. |
| Billto_prefix | String | False |
Prefix for the billing contact (e.g., Mr., Ms.). |
| Billto_firstname | String | False |
First name of the billing contact. |
| Billto_initial | String | False |
Middle initial of the billing contact. |
| Billto_lastname | String | False |
Last name of the billing contact. |
| Billto_companyname | String | False |
Company name associated with the billing contact. |
| Billto_printas | String | False |
Formatted name for printing purposes in the billing address. |
| Billto_phone1 | String | False |
Primary phone number for the billing contact. |
| Billto_phone2 | String | False |
Secondary phone number for the billing contact. |
| Billto_cellphone | String | False |
Cell phone number for the billing contact. |
| Billto_pager | String | False |
Pager number for the billing contact, if applicable. |
| Billto_fax | String | False |
Fax number associated with the billing contact. |
| Billto_email1 | String | False |
Primary email address for the billing contact. |
| Billto_email2 | String | False |
Secondary email address for the billing contact. |
| Billto_url1 | String | False |
Primary website or URL associated with the billing contact. |
| Billto_url2 | String | False |
Secondary website or URL associated with the billing contact. |
| Billto_visible | Boolean | False |
Indicates whether the billing contact is visible in system records. |
| Billto_mailaddress_address1 | String | False |
Primary address line 1 for the billing location. |
| Billto_mailaddress_address2 | String | False |
Primary address line 2 for the billing location. |
| Billto_mailaddress_city | String | False |
City for the billing location's address. |
| Billto_mailaddress_state | String | False |
State for the billing location's address. |
| Billto_mailaddress_zip | String | False |
Postal or ZIP code for the billing location's address. |
| Billto_mailaddress_country | String | False |
Country for the billing location's address. |
| Billto_mailaddress_countrycode | String | False |
Country code for the billing location's address. |
| Message | String | False |
Message or note associated with the SO document. |
| Prrecordkey | String | False |
Key linking to the parent record of the sales order. |
| Invbatchkey | String | False |
Key linking to the invoice batch associated with the sales order. |
| Prinvbatchkey | String | False |
Key linking to the primary invoice batch of the sales order. |
| Printed | String | False |
Indicates whether the sales order has been printed. |
| Backorder | String | False |
Status of items on backorder for the sales order. |
| Subtotal | Double | False |
Subtotal amount for the sales order, excluding taxes and shipping. |
| Total | Double | False |
Total amount for the sales order, including all charges. |
| Entglgroup | Int64 | False |
Entity GL group identifier linked to the sales order. |
| Currency | String | False |
Currency used for the sales order. |
| Exchratedate | Datetime | False |
Date the exchange rate was applied for the sales order. |
| Exchratetypes_name | String | False |
Exchange rate type name applied to the sales order. |
| Exchrate | Double | False |
Exchange rate used for currency conversion in the sales order. |
| Schopkey | String | False |
Key linking to the schedule operation associated with the sales order. |
| Salescontract | String | False |
Sales contract linked to the sales order. |
| Usedascontract | String | False |
Indicates if the sales order was used as a contract. |
| Trx_subtotal | Double | False |
Subtotal in transactional currency for the sales order. |
| Trx_total | Double | False |
Total amount in transactional currency for the sales order. |
| Exch_rate_type_id | String | False |
Identifier for the exchange rate type used in the sales order. |
| Reneweddoc | String | False |
Indicates if the sales order has been renewed. |
| Basecurr | String | False |
Base currency of the sales order. |
| Systemgenerated | String | False |
Indicates if the sales order was system-generated. |
| Invoicerunkey | Int64 | False |
Key linking to the invoice run associated with the sales order. |
| Docpar_in_out | String | False |
Indicates if the document parent is inbound or outbound. |
| Custvendid | String | False |
Customer or vendor ID associated with the sales order. |
| Custvendname | String | False |
Customer or vendor name associated with the sales order. |
| Haspostedrevrec | String | False |
Indicates if revenue recognition has been posted for the sales order. |
| Contractid | String | False |
Identifier for the contract linked to the sales order. |
| Contractdesc | String | False |
Description of the contract associated with the sales order. |
| Trx_totalpaid | String | False |
Total amount paid in transactional currency for the sales order. |
| Totalpaid | String | False |
Total amount paid for the sales order. |
| Trx_totalentered | String | False |
Total amount entered in transactional currency for the sales order. |
| Totalentered | String | False |
Total amount entered for the sales order. |
| Trx_totaldue | String | False |
Total amount due in transactional currency for the sales order. |
| Totaldue | String | False |
Total amount due for the sales order. |
| Paymentstatus | String | False |
Payment status of the sales order. |
| Sign_flag | Int64 | False |
Flag indicating the sign of amounts in the sales order. |
| Vsoepricelist | String | False |
VSOE price list associated with the sales order. |
| Vsoeprclstkey | String | False |
Key linking to the VSOE price list associated with the sales order. |
| Origdocdate | Datetime | False |
Original document date for the sales order. |
| Hasadvbilling | Boolean | False |
Indicates if advanced billing is present for the sales order. |
| Invoicerun_expensepricemarkup | Double | False |
Expense price markup associated with the invoice run for the sales order. |
| Invoicerun_description | String | False |
Description of the invoice run linked to the sales order. |
| Projectkey | Int64 | False |
Key linking to the project associated with the sales order. |
| Project | String | False |
Project identifier linked to the sales order. |
| Projectname | String | False |
Name of the project associated with the sales order. |
| Megaentitykey | Int64 | False |
Key linking to the mega entity associated with the sales order. |
| Megaentityid | String | False |
Identifier for the mega entity associated with the sales order. |
| Megaentityname | String | False |
Name of the mega entity associated with the sales order. |
| Record_url | String | False |
A user-independent, deep-link URL for viewing the record of the sales order. |