Click or drag to resize

IRelation Interface

A Relation links two records in the system. Currently used for activity links and for company/person links.

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
public interface IRelation : IModelBase

The IRelation type exposes the following members.

Properties
  NameDescription
Public propertyCode exampleActiveText
ActiveText The text for the active side of the relation, e.g. SuperOffice ASA owns SuperOffice Sweden AB, then owns is the active text
Public propertyCode exampleChanged
has record been changed since read? If the relation has been modified since it was loaded, this will return false.
Public propertyCode exampleComment
Comment The relations description textbox - it may contain text describing the relation. Filled out by the user
Public propertyCode exampleCreatedAssociate
The user that created the object The associate that first created the relation
Public propertyCode exampleCreatedDate
The date the object was saved to the database. The date and time the relation was first created
Public propertyExternalFieldChanged
have external fields been changed?
Public propertyCode exampleGroupID
GroupId This property is currently not in use and will just return 0.
Public propertyCode exampleIdentity
The primary key on the primary table. Is zero for new objects. Is set when an object is saved. This is the internal ID of the relation
Public propertyCode exampleIsAvailable
is record available in db? Checks if the record is available in the database. It’s useful to check if a project actually exists before adding new properties to it.
Public propertyCode exampleIsRequiredFilled
Are all the required fields filled out? Can we save the record? Checks if all properties that are required in this model is filled
Public propertyCode exampleIsValid
does the record exist? To save time, we don't load a record into buffer before one of its properties is asked for. This checks if the requested record is available in buffer
Public propertyCode examplePassiveText
PassiveText The text for the passive side of the relation, e.g. SuperOffice ASA is owned by SuperOffice Sweden AB, then is owned by is the passive text
Public propertyCode exampleReversed
Reversed This property is currently not in use
Public propertyCode exampleSentry
Sentry settings for this object. Lets you find out your read/write access to the object.
Public propertyCode exampleSourceRecord
SourceRecord object Depending on what type of relation this is, and what SourceTable the relation has, this will return a SOContact object or a SOPerson object
Public propertyCode exampleSourceTable
SourceTable - derived from the SourceRecord This return the Table id (see the database manual) for the source record, either the person table (table id = 6) or the contact table (table id = 5).
Public propertyCode exampleTargetRecord
TargetRecord Depending on what type of relation this is, and what TargetTable the relation has, this will return a SOContact object or a SOPerson object
Public propertyCode exampleTargetTable
TargetTable This return the Table id (see the database manual) for the source record, either the person table (table id = 6) or the contact table (table id = 5).
Public propertyCode exampleType
Type The relation types internal database id, all definitions are stored in the RelationDefinition table. The id returned is the reldef_id for the ActiveText and PassiveText of a relation.
Public propertyCode exampleUpdatedAssociate
The last user to modify the object The last associate that updated this relation object. If the relation has never been updated, this will return 0
Public propertyCode exampleUpdatedDate
The date of the most recent update. The date and time the relation was last edited. If the relation has never been updated, this will return 0; formatted as a SuperOffice date (see the database manual), this will return 01.01.1970
Public propertyValidationMessage
get validation message, if empty model will think it is ok to save
Top
Methods
  NameDescription
Public methodCode exampleCancelChanges
Undo any changes made since the object was loaded. If you made changes to the model that you don't want to be saved to the database, call the CancelChanges method
Public methodCode exampleChangeIdentity
Loads a different record into the object. Causes changes to the existing object to be saved first. Saves the changes made to the relation model to the database. The last thing you do to an object if you want the changes you made to be saved. The ChangeIdentity method calls the save method first.
Public methodCode exampleDelete
Delete the object from the database. May throw an error if you are not allowed to delete the object. Deletes the specified relation model from the database
Public methodCode exampleSave
Persist the object to the database. May throw an error if you are not allowed to save changes to the object. Saves the changes you made to the project model to the database, does not return the new data from the database.
Public methodCode exampleSetDefaults
Populate the object with default values, such as setting the owner to the current user. Uses the UserPreferences table to set the predefined default settings for a relation. The SetDefaults method is only available for current objects in this version of SuperOfficeDB Type Library
Top
See Also