Click or drag to resize

IDatabase Methods

The IDatabase type exposes the following members.

Methods
  NameDescription
Public methodCode exampleAddDocument
Add an existing file to the document archive, returning a new document object for the file.
Public methodCode exampleAddDocumentForAssociate
Add an existing file to the document archive on behalf of some associate, returning a new document object for the file.
Public methodCode exampleCreateAppointment
Returns a blank Appointment. Use SetDefaults on the returned object to fill it with sensible data.
Public methodCreateAppointmentSentry
Public methodCreateAssociate
method CreateAssociate
Public methodCode exampleCreateContact
Returns a blank Contact object. Use SetDefaults on the contact object to fill it with sensible data.
Public methodCreateContactSentry
Public methodCode exampleCreateDocument
Creates a blank document object. Use SetDefaults on the returned object to fill it with sensible data.
Public methodCode exampleCreatePerson
Return a blank Person object. Use SetDefaults on the returned object to fill it with sensible data.
Public methodCreatePersonSentry
Public methodCode exampleCreateProject
Create a blank Project object. Use SetDefaults on the returned object to fill it with sensible data.
Public methodCode exampleCreateProjectMember
Create a new ProjectMember object.
Public methodCreateProjectSentry
Public methodCode exampleCreateRelation
Create a blank Relation object. Use the Save() method to persist the object to the database.
Public methodCreateRelationSentry
Public methodCode exampleCreateSale
Create a blank Sale object. Returns an error if you are not allowed to create sales. Use SetDefaults on the sale object to fill it with sensible data
Public methodCreateSaleSentry
Public methodCode exampleCreateSaleStakeholder
Create a new SaleStakeholder object. Use SetDefaults on the sale object to fill it with sensible data
Public methodCode exampleCreateSelection
Create a blank Selection, Returns an error if the user us not allowed to create selections. Use SetDefaults on the selection object to fill it with sensible data
Public methodCreateSelectionSentry
Public methodCode exampleExportBlobToFile
Copy a blob to a file
Public methodCode exampleGetADOConnection
Returns an ADO Connection object for the current database. Returns an error if this is the Application.Database object. To connect to the database we have made it simple to get the connection string. This will require some sort of login. GetADOConnection creates a new connection each time you call it, and its only possible to call it trough the SuperOfficedb Library, calling it from SOApplication will generate an error.
Public methodCode exampleGetADOConnectionString
Returns an ADO connection string corresponding to the current database To connect to the database we have made it simple to get the connection string. This will require some sort of login. GetADOConnection creates a new connection each time you call it, and its only possible to call it trough the SuperOfficedb Library, calling it from SOApplication will generate an error.

To connect to the database we have made it simple to get the connection string, this will only return the string and not build the connection.

This will require some sort of login. Its only possible to call GetADOConnectionString trough the SuperOfficeDB Library, calling it from SOApplication will generate an error.

Public methodCode exampleGetAppointment
Get an Appointment object by id. Returns an error if the appointment is hidden by sentry rules. Calling this function and passing 0 as appointmentID will create a new appointment object.
Public methodCode exampleGetAssociate
Returns an Associate object with a given associate id.
Public methodCode exampleGetAssociateList
Returns a list of associates (internal employees, associate.type=0) (internal employees, associate.type=0). Does not check if the associate is retired.
Public methodGetChecklist
Public methodCode exampleGetContact
Returns a Contact object with a given ID. Returns an error if the contact is not readable.
Public methodCode exampleGetDocument
Get an existing document object. Returns an error if the document is hidden.
Public methodCode exampleGetDocumentFromPath
Find out if a given document is archived in SuperOffice. Returns the corresponding document object or NULL if no docplugin can recognize the path.
Public methodCode exampleGetExternalPersonList
Returns a list of all external users (associate.type=4)
Public methodGetFavouriteItems
Returns a collection of list items in the user's favourites for the given table.
Public methodCode exampleGetHeadings
Returns a collection of Headings for a given list. From CRM 5 we have added the possibility to sort list items under different headings, visible for all or only for some usergroups.
Public methodCode exampleGetHistoryItems
Returns a collection of list items in the user's history for the given table. These are the most recent items the current user have accessed.
Public methodCode exampleGetHistoryItemsByTableNameAndExtraId
Returns a collection of list items in the user's history for the given table name and extra id. These are the most recent items the current user have accessed.
Public methodCode exampleGetInvitations
Get a collection with all invitations for the logged in user
Public methodCode exampleGetList
Returns a collection of list items for a given list item table.

Returns IListTextItems containing all the items in the given table, filtered and grouped according to the current user's group, but without the headings.

Note that items that are repeated under more than one heading will be repeated in the list.

Public methodCode exampleGetListItem
Return a given List Item in a given list table.

Returns IListTextItems containing all the items in the given table, filtered and grouped according to the current user's group, but without the headings.

Note that items that are repeated under more than one heading will be repeated in the list.

Public methodCode exampleGetListItemByName
Return a given List Item in a given list table based on the text of the item rather than the id.

Returns IListTextItems containing all the items in the given table, filtered and grouped according to the current user's group, but without the headings.

Note that items that are repeated under more than one heading will be repeated in the list.

Public methodCode exampleGetLocationList
Returns a list of resources that are locations New in Seven.
Public methodCode exampleGetPerson
Get a Person object by person_id. Returns an error if the person is hidden by sentry rules.
Public methodCode exampleGetProject
Get an existing project from the database. Returns an error if the project is hidden.
Public methodCode exampleGetProjectMember
Get an existing ProjectMember by its projectmember_id
Public methodGetQuote
Get an existing Quote by its quote_id
Public methodGetQuoteAlternative
Get an existing QuoteAlternative by its quotealternative_id
Public methodGetQuoteLine
Get an existing QuoteLine by its quoteline_id
Public methodGetQuoteVersion
Get an existing QuoteVersion by its quoteversion_id
Public methodCode exampleGetRelation
Get a Relation object. Return an error if the relation is hidden. If you call the GetRelation function with 0, it will create a new relation, like Database.CreateRelation
Public methodCode exampleGetResourceList
Returns a list of resources (associate.type = 1)
Public methodCode exampleGetSale
Get an existing Sale object by sale_id. Returns an error if the sale is hidden.
Public methodCode exampleGetSaleStakeholder
Get an existing SaleStakeholder by its salestakeholder_id
Public methodCode exampleGetSelection
Get an existing Selection. Returns an error if the selection is not visible for the user.
Public methodCode exampleGetStagesForSaleType
Returns the valid salestages for the given saletype New in Seven.
Public methodCode exampleImport
Perform unattended Import using an import description file created earlier. Returns true if the import succeeded.

The *.dsc file has information regarding the file mapping and what file should be imported (and where is it located).

There are 1 import description and 1 import text file available under \Examples\Import. Copy this to C:\Imp, and the example code will perform a successful import.

Public methodCode exampleImportBlobFromFile
Copy a file into the database. Returns the blob record id.

The *.dsc file has information regarding the file mapping and what file should be imported (and where is it located).

There are 1 import description and 1 import text file available under \Examples\Import. Copy this to C:\Imp, and the example code will perform a successful import.

Public methodCode exampleIsAnsiBase
Returns TRUE if database uses ANSI text, FALSE if it uses Unicode text From 6.2 our database support Unicode (UTF8 collating order), read more on Techdoc
Public methodCode exampleLogin
Log in to the database with the given user and password. Returns true if the login succeeded.
Public methodCode exampleRefresh
Reloads all the internal caches (lists, roles, users, etc).
Public methodCode exampleSubstituteTemplateVars
Substitutes template variables in the source string, returning the result. Assumes the current user.

This function will replace template variables in a string with the specified information, e.g. replace the <name> template variable with the text "SuperOffice AS". If you want to create your own template systems, you can access our substitution engine using this function. This will fill the values based on the logged in user.

Read More

Public methodCode exampleSubstituteTemplateVarsEx
Substitute template variables based on an associateid, returning the result.

This function will replace template variables in a string with the specified information, e.g. replace the <name> template variable with the text "SuperOffice AS". If you want to create your own template systems, you can access our substitution engine using this function. This will fill the values based on the logged in user.

Read More

This function will replace template variables in a string with the specified information, e.g. replace the <name> template variable with "SuperOffice AS". If you want to create your own template systems, you can access our substitution engine using this function. This will fill the values based on the associate provided.

Read More

Public methodCode exampleSubstituteTemplateVarsUrlEncoding
Substitute template variables based on an associateid, with the selected url encoding, returning the result.

This function will replace template variables in a string with the specified information, e.g. replace the <name> template variable with the text "SuperOffice AS". If you want to create your own template systems, you can access our substitution engine using this function. This will fill the values based on the logged in user.

Read More

This function will replace template variables in a string with the specified information, e.g. replace the <name> template variable with the text "SuperOffice AS". If you want to create your own template systems, you can access our substitution engine using this function. This will fill the values based on the logged in user.

Read More

Top
See Also