Table

smmOpportunityRelTable

Opportunity relations table

Links an opportunity to other records. Each row holds an opportunity ID plus a table ID and record ID that identify the linked record. Related tables include contacts, projects, sales quotations, campaigns and leads.

Table name
smmOpportunityRelTable
Module
Sales and marketing
Table group
Main
Table type
Regular
Data per company
Yes
Configuration key
SmmCRM
Primary index
RecId
Replacement key
RefIdIdx
Key fields
OpportunityId, RefTableId, RefRecId
Model
Foundation

Fields (9)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
OpportunityIdThe opportunity that this link belongs to.String
smmOpportunityId
YessmmOpportunityTable.OpportunityIdNone
RefTableIdID of the table that holds the linked record.Integer
RefTableId
NoNone
RefRecIdSystem record ID of the linked record, such as a contact.Int64
RefRecId
NoNone
DataAreaIdThe company (legal entity) that the record belongs to. System field.String (4)
DataAreaId
NoNone
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field.Int64
RecId
NoNone
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field.Integer
RecVersion
NoNone
SysRowVersionA system row version number that is used for change tracking. System field.Int64
SysRowVersion
NoNone
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone

Indexes (1)

Relations (6)

Each relation joins smmOpportunityRelTable to another table on the fields shown.

  • contactPerson → ContactPerson

    Join on RefTableId = ContactPerson.TableId, RefRecId = ContactPerson.RecId

    Many smmOpportunityRelTable records → zero or one ContactPerson record

  • ProjTable → ProjTable

    Join on RefTableId = ProjTable.TableId, RefRecId = ProjTable.RecId

    Many smmOpportunityRelTable records → zero or one ProjTable record

  • salesQuotationTable → SalesQuotationTable

    Join on OpportunityId = SalesQuotationTable.OpportunityId

    Cardinality not set in the metadata.

  • smmCampaignTable → smmCampaignTable

    Join on RefTableId = smmCampaignTable.TableId, RefRecId = smmCampaignTable.RecId

    Many smmOpportunityRelTable records → zero or one smmCampaignTable record

  • smmLeadTable → smmLeadTable

    Join on RefTableId = smmLeadTable.TableId, RefRecId = smmLeadTable.RecId

    Many smmOpportunityRelTable records → zero or one smmLeadTable record

  • smmOpportunityTable → smmOpportunityTable

    Join on OpportunityId = smmOpportunityTable.OpportunityId

    Many smmOpportunityRelTable records → exactly one smmOpportunityTable record

Get this data out

No public entity reads from smmOpportunityRelTable. Its data is only reachable through the application, a custom entity or a database export.

Need help with smmOpportunityRelTable in a report, an integration or a migration? Talk to Dr Dynamics.

Email sales@drdynamics.co.uk