Show / Hide Table of Contents

Class DocumentEntity

Partial DocumentEntity class associating the generated DocumentEntity with an interface.

Inheritance
object
DocumentEntity
Implements
IActivityEntityCarrier
IRelationEntityCarrier
ILinksContainerEntityCarrier
IProjectRelationEntityCarrier
IContactPersonRelationEntityCarrier
IEntityCarrier
IUdefFieldCarrier
IExtraFieldCarrier
IPublishedCarrier
IVisibleForCarrier
Namespace: SuperOfficeCRMServices
Assembly: SuperOffice.Services.dll
Syntax
[DataContract(Namespace = "http://www.superoffice.net/ws/crm/NetServer/11.7.0.0")]
public class DocumentEntity : Carrier, IActivityEntityCarrier, IRelationEntityCarrier, ILinksContainerEntityCarrier, IProjectRelationEntityCarrier, IContactPersonRelationEntityCarrier, IEntityCarrier, IUdefFieldCarrier, IExtraFieldCarrier, IPublishedCarrier, IVisibleForCarrier
Examples

Get DocumentEntity 123 using the agent:

using SuperOffice;
using SuperOffice.CRM.Services;

using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
   var agent = new DocumentAgent();
   var documentEntity = agent.GetDocumentEntity( 123 );
}

Find all DocumentEntity, get related items using archive agent.

var archive = new ArchiveAgent();
var rows = archive.GetArchiveListByColumns2("FindDocument", "...", null, "getAllRows eq 1", null, 0, 100 );
var links = archive.GetArchiveListByColumns2("Links", "...", null, "sourceDocumentRestrictionId eq 123", null, 0, 100 );

Constructors

DocumentEntity()

Default constructor

Declaration
public DocumentEntity()

Properties

ActiveLinks

Number of active links to sale, document, appointment.

Declaration
[DataMember]
public virtual int ActiveLinks { get; set; }
Property Value
Type Description
int

Associate

The owner of the document - the associate whose checklist the document is in.

Use MDO List name "associate" to get list items.

Declaration
[DataMember]
public virtual Associate Associate { get; set; }
Property Value
Type Description
Associate

Attention

Attention/salutation

Declaration
[DataMember]
public virtual string Attention { get; set; }
Property Value
Type Description
string

Completed

Document Completed state. This is the part of the Status property.

Declaration
[DataMember]
public virtual ActivityStatus Completed { get; set; }
Property Value
Type Description
SuperOffice.Data.ActivityStatus

Contact

The contact associated with the document. It may also be null if no contact is associated with the document.

Use MDO List name "contact" to get list items.

Declaration
[DataMember]
public virtual Contact Contact { get; set; }
Property Value
Type Description
Contact

CreatedBy

The person that first created the document. The property is read-only.

Declaration
[DataMember]
public virtual Associate CreatedBy { get; set; }
Property Value
Type Description
Associate

CreatedDate

Registered when in UTC.

Declaration
[DataMember]
public virtual DateTime CreatedDate { get; set; }
Property Value
Type Description
DateTime

CustomFields

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 ExtraFields and UserDefinedFields properties are deprecated in favor of this combined collection.

Declaration
[DataMember]
public StringDictionary CustomFields { get; set; }
Property Value
Type Description
SuperOffice.CRM.Services.StringDictionary
Remarks

The naming convention of the key string is as follows:

Extra field data [Extra field name]

Example:

'x_gorp' = '[I:123]'
User defined field data [Prog-id name]

Example:

'SuperOffice:1' = '[I:123]'

Date

date + start time planned

Declaration
[DataMember]
public virtual DateTime Date { get; set; }
Property Value
Type Description
DateTime

Description

The actual text, max 2047 significant characters even though it is stored as a larger data type on some databases

Declaration
[DataMember]
public virtual string Description { get; set; }
Property Value
Type Description
string

DocumentId

Primary key

Declaration
[DataMember]
public virtual int DocumentId { get; set; }
Property Value
Type Description
int

DocumentTemplate

The template type of the document.

Use MDO List name "doctmpl" to get list items.

Declaration
[DataMember]
public virtual DocumentTemplate DocumentTemplate { get; set; }
Property Value
Type Description
DocumentTemplate

ExternalRef

External reference for document plugin to resolve document identity (Notes ID, e-mail message ID, whatever)

Declaration
[DataMember]
public virtual string ExternalRef { get; set; }
Property Value
Type Description
string

ExtraFields

Deprecated: Use CustomFields instead. Extra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc.

Declaration
[DataMember]
public StringDictionary ExtraFields { get; set; }
Property Value
Type Description
SuperOffice.CRM.Services.StringDictionary
Remarks

The naming convention of the key string is as follows:

Plug-in data [Plug-in name].[Property name] Example: DocumentPlugin.DocumentType
Foreign key data 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
User defined table data [Table name].[Field name] Example: Phunneling.AggregatedSales
Other 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).

Header

Visible document name

Declaration
[DataMember]
public virtual string Header { get; set; }
Property Value
Type Description
string

IsPublished

Publication is published

Declaration
[DataMember]
public bool IsPublished { get; set; }
Property Value
Type Description
bool

Links

List of all elements linked to the document.

Declaration
[DataMember]
public virtual Link[] Links { get; set; }
Property Value
Type Description
Link

LockSemantics

Declaration
[DataMember]
public virtual DocumentLockSemantics LockSemantics { get; set; }
Property Value
Type Description
SuperOffice.CRM.Documents.DocumentLockSemantics

Name

File name

Declaration
[DataMember]
public virtual string Name { get; set; }
Property Value
Type Description
string

OurRef

Our reference, searchable field from freetext search

Declaration
[DataMember]
public virtual string OurRef { get; set; }
Property Value
Type Description
string

Person

A document may also be connected to a person; this must be a contact person registered on the current company. This does not mean however that a person is required.

Use MDO List name "person" to get list items.

Declaration
[DataMember]
public virtual Person Person { get; set; }
Property Value
Type Description
Person

Project

A document may also be connected to a project, so you see the document both on the company card, and on the project card. This does not mean however that a project is required.

Use MDO List name "project" to get list items.

Declaration
[DataMember]
public virtual Project Project { get; set; }
Property Value
Type Description
Project

PublishEventDate

Publish event date

Declaration
[DataMember]
public DateTime PublishEventDate { get; set; }
Property Value
Type Description
DateTime

PublishFrom

Publication valid from (inclusive)

Declaration
[DataMember]
public DateTime PublishFrom { get; set; }
Property Value
Type Description
DateTime

PublishTo

Publication valid to (inclusive)

Declaration
[DataMember]
public DateTime PublishTo { get; set; }
Property Value
Type Description
DateTime

Sale

A document may also be connected to a sale, so you see the document on the company card, on the project card and on the sale card. This does not mean however that a sale is required. May be null.

Use MDO List name "sale" to get list items.

Declaration
[DataMember]
public virtual Sale Sale { get; set; }
Property Value
Type Description
Sale

Snum

The sequence number allocated from refcount on used template when creating the document

Declaration
[DataMember]
public virtual int Snum { get; set; }
Property Value
Type Description
int

SuggestedDocumentId

Suggested guide item that this document is an instance of (Note: NOT valid for appointments, they have their own link)

Declaration
[DataMember]
public virtual int SuggestedDocumentId { get; set; }
Property Value
Type Description
int

Type

Is this a normal document or a mail-merge or report?

Declaration
[DataMember]
public virtual AppointmentType Type { get; set; }
Property Value
Type Description
SuperOffice.Data.AppointmentType

UpdatedBy

The person that last updated the appointment.

Declaration
[DataMember]
public virtual Associate UpdatedBy { get; set; }
Property Value
Type Description
Associate

UpdatedDate

Last updated when in UTC.

Declaration
[DataMember]
public virtual DateTime UpdatedDate { get; set; }
Property Value
Type Description
DateTime

UserDefinedFields

Deprecated: Use CustomFields 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"

Declaration
[DataMember]
public StringDictionary UserDefinedFields { get; set; }
Property Value
Type Description
SuperOffice.CRM.Services.StringDictionary

VisibleFor

The set of users or groups the record is visible for

Declaration
[DataMember]
public VisibleFor[] VisibleFor { get; set; }
Property Value
Type Description
VisibleFor

YourRef

Your reference

Declaration
[DataMember]
public virtual string YourRef { get; set; }
Property Value
Type Description
string

Methods

ToString()

Returns the carrier contents as a formatted string.

Declaration
public override string ToString()
Returns
Type Description
string

The carrier contents.

ToString(string)

Returns the carrier contents as a formatted string, useful for debugging. Each line in the output is prefixed with the input value.

Declaration
public string ToString(string prefix)
Parameters
Type Name Description
string prefix

The line prefix (typically used for indenting)

Returns
Type Description
string

The carrier contents.

Implements

IActivityEntityCarrier
IRelationEntityCarrier
ILinksContainerEntityCarrier
IProjectRelationEntityCarrier
IContactPersonRelationEntityCarrier
IEntityCarrier
IUdefFieldCarrier
IExtraFieldCarrier
IPublishedCarrier
IVisibleForCarrier

See Also

IDocumentAgent
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top