Namespace: SuperOffice.WebApi.Data
Assembly: SuperOffice.WebApi.dllCarrier object for SaleEntity.
The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.
Get SaleEntity 123 using the WebApi client:
<pre><code class=“lang-csharp”>var configuration = new WebApiConfiguration(url);
var agent = new SaleAgent(configuration);
var saleEntity = agent.GetSaleEntity( 123 );</code></pre>
The Sale completed state. The completed state is either Started or Completed. NotStarted is treated as Started. The value maps to the Done database field.
NULL if unknown enum value.
The Sale completed state. The completed state is either Started or Completed. NotStarted is treated as Started. The value maps to the Done database field.
Raw string enum value.
The contact associated with the sale. It may also be 0 if no contact is associated with the sale.
<p>Use MDO List name “contact” to get list items.</p>
Udef + Extra fields added to the carrier. Extra fields as defined by changes to database schema + user-defined fields as defined by admin.
Custom fields combines user defined fields and extra fields into one bucket.
The individual <xref href=“SuperOffice.WebApi.Data.SaleEntity.ExtraFields” data-throw-if-not-resolved=“false”></xref> and <xref href=“SuperOffice.WebApi.Data.SaleEntity.UserDefinedFields?text=UserDefinedFields” data-throw-if-not-resolved=“false”></xref> properties are deprecated in favor of this
combined collection.
The value string is the encoded value: “[I:123]” or “[DT:2019-09-11]”.
public virtual StringDictionary CustomFields { get; set; }
The naming convention of the key string is as follows:
<table><tbody><tr><td class=“term”>Extra field data</td><td class=“description”>
[Extra field name]<p></p>
Example: <pre><code class=“lang-csharp”>‘x_gorp’ = ‘[I:123]’</code></pre>
</td></tr><tr><td class=“term”>User defined field data</td><td class=“description”>
[Prog-id name]<p></p>
Example: <pre><code class=“lang-csharp”>‘SuperOffice:1’ = ‘[I:123]’</code></pre><p></p>
</td></tr></tbody></table>
Deprecated: Use <xref href=“SuperOffice.WebApi.Data.SaleEntity.CustomFields” data-throw-if-not-resolved=“false”></xref> instead.
Extra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc.
The value string is the encoded value: “[I:123]” or “[DT:2019-09-11]”.
public virtual StringDictionary ExtraFields { get; set; }
The naming convention of the key string is as follows:
<table><tbody><tr><td class=“term”>Plug-in data</td><td class=“description”>
[Plug-in name].[Property name]
Example: DocumentPlugin.DocumentType
</td></tr><tr><td class=“term”>Foreign key data</td><td class=“description”>
The device identity is appended directly to the device name if it exists.
This is not commonly used, but the database opens for this as a possibility to have several devices with the same name,
and hence we would ensure an unique key if this field is used.
Example: Audience.SecretService.DefaultCountry
</td></tr><tr><td class=“term”>User defined table data</td><td class=“description”>
[Table name].[Field name]
Example: Phunneling.AggregatedSales
</td></tr><tr><td class=“term”>Other</td><td class=“description”>
Other data sources must ensure an unique name. If the key already exists we do not add the data to the dictionary.
We also ensure that SuperOffice data are added first, so that existing data doesnt change when more data sources are added (with duplicate data keys).
</td></tr></tbody></table>
Next due date, this is a denormalization of ‘closest future activity date, or most recent if no future activities’. Maintained by the system, but very convenient for searching.
A sale may also be connected to a person - this must be a contact person registered on the current contact. This does not mean that a person is required.
<p>Use MDO List name “person” to get list items.</p>
A sale may also be connected to a project, so you see the sale both on the company card, and on the project card. This does not mean that a project is required.
<p>Use MDO List name “project” to get list items.</p>
Deprecated: Use <xref href=“SuperOffice.WebApi.Data.SaleEntity.CustomFields” data-throw-if-not-resolved=“false”></xref> instead.
Dictionary of user defined field data.
The key string is the ProgId of the UdefField, or if the ProgId is empty it is a string of the format “SuperOffice:[UdefFieldIdentity]”, e.g. “SuperOffice:1234”
The value string is the encoded value: “[I:123]” or “[DT:2019-09-11]”.
public virtual StringDictionary UserDefinedFields { get; set; }