Hi all
I want some fields from opportunityclose table but I am unable to find it the sql database.
How cam I find opportunityclose in the database?
*This post is locked for comments
I have the same question (0)Hello,
You can't find that table because it doesn't exist. All the required information is stored in ActivityPointerBase table. If you want to recheck that just open for edit OpportunityClose view. You will find query similar to following inside:
select
-- logical attributes
[lk_externalparty_opportunityclose_modifiedby].[FullName],
[competitor_opportunity_activities].[Name],
[lk_opportunityclose_createdby].[FullName],
[lk_opportunityclose_createdonbehalfby].[FullName],
[lk_opportunityclose_modifiedonbehalfby].[YomiFullName],
[lk_opportunityclose_createdby].[YomiFullName],
[lk_externalparty_opportunityclose_modifiedby].[YomiFullName],
[lk_opportunityclose_modifiedby].[FullName],
[lk_opportunityclose_modifiedonbehalfby].[FullName],
[lk_externalparty_opportunityclose_createdby].[FullName],
[lk_opportunityclose_createdonbehalfby].[YomiFullName],
[competitor_opportunity_activities].[YomiName],
[lk_opportunityclose_modifiedby].[YomiFullName],
[lk_externalparty_opportunityclose_createdby].[YomiFullName],
[transactioncurrency_opportunityclose].[CurrencyName],
-- ownership entries
OwnerId = [ActivityPointerBase].OwnerId,
OwnerName = XXowner.Name,
OwnerYomiName = XXowner.YomiName,
OwnerDsc = 0, -- DSC is removed, stub it to 0
OwnerIdType = XXowner.OwnerIdType,
OwningUser = case
when XXowner.OwnerIdType= 8 then XXowner.OwnerId
else null
end,
OwningTeam = case
when XXowner.OwnerIdType= 9 then XXowner.OwnerId
else null
end,
-- physical attribute
[ActivityPointerBase].[ModifiedBy],
[ActivityPointerBase].[CreatedOn],
[ActivityPointerBase].[ActualStart],
[ActivityPointerBase].[ActualDurationMinutes],
[ActivityPointerBase].[ActivityId],
[ActivityPointerBase].[CreatedBy],
[ActivityPointerBase].[ActualRevenue],
[ActivityPointerBase].[ScheduledStart],
[ActivityPointerBase].[IsWorkflowCreated],
[ActivityPointerBase].[StateCode],
[ActivityPointerBase].[StatusCode],
[ActivityPointerBase].[CompetitorId],
[ActivityPointerBase].[ServiceId],
[ActivityPointerBase].[IsBilled],
[ActivityPointerBase].[Subject],
[ActivityPointerBase].[OwningBusinessUnit],
[ActivityPointerBase].[Description],
[ActivityPointerBase].[ActualEnd],
[ActivityPointerBase].[ScheduledEnd],
[ActivityPointerBase].[OppCloseCategory],
[ActivityPointerBase].[ScheduledDurationMinutes],
[ActivityPointerBase].[RegardingObjectId],
[ActivityPointerBase].[OppCloseSubcategory],
[ActivityPointerBase].[VersionNumber],
[ActivityPointerBase].[ModifiedOn],
[ActivityPointerBase].[RegardingObjectIdName],
[ActivityPointerBase].[TransactionCurrencyId],
[ActivityPointerBase].[UTCConversionTimeZoneCode],
[ActivityPointerBase].[OppCloseImportSequenceNumber],
[ActivityPointerBase].[TimeZoneRuleVersionNumber],
[ActivityPointerBase].[ExchangeRate],
[ActivityPointerBase].[OppCloseOverriddenCreatedOn],
[ActivityPointerBase].[ActualRevenue_Base],
[ActivityPointerBase].[RegardingObjectTypeCode],
[ActivityPointerBase].[CreatedOnBehalfBy],
[ActivityPointerBase].[ModifiedOnBehalfBy],
[ActivityPointerBase].[ActivityTypeCode],
[ActivityPointerBase].[IsRegularActivity],
[ActivityPointerBase].[CreatedByExternalParty],
[ActivityPointerBase].[ModifiedByExternalParty]
from [ActivityPointerBase]
left join [CompetitorBase] [competitor_opportunity_activities] on ([ActivityPointerBase].[CompetitorId] = [competitor_opportunity_activities].[CompetitorId])
left join [ExternalPartyBase] [lk_externalparty_opportunityclose_createdby] on ([ActivityPointerBase].[CreatedByExternalParty] = [lk_externalparty_opportunityclose_createdby].[ExternalPartyId])
left join [ExternalPartyBase] [lk_externalparty_opportunityclose_modifiedby] on ([ActivityPointerBase].[ModifiedByExternalParty] = [lk_externalparty_opportunityclose_modifiedby].[ExternalPartyId])
left join [SystemUserBase] [lk_opportunityclose_createdby] with(nolock) on ([ActivityPointerBase].[CreatedBy] = [lk_opportunityclose_createdby].[SystemUserId])
left join [SystemUserBase] [lk_opportunityclose_createdonbehalfby] with(nolock) on ([ActivityPointerBase].[CreatedOnBehalfBy] = [lk_opportunityclose_createdonbehalfby].[SystemUserId])
left join [SystemUserBase] [lk_opportunityclose_modifiedby] with(nolock) on ([ActivityPointerBase].[ModifiedBy] = [lk_opportunityclose_modifiedby].[SystemUserId])
left join [SystemUserBase] [lk_opportunityclose_modifiedonbehalfby] with(nolock) on ([ActivityPointerBase].[ModifiedOnBehalfBy] = [lk_opportunityclose_modifiedonbehalfby].[SystemUserId])
left join [TransactionCurrencyBase] [transactioncurrency_opportunityclose] on ([ActivityPointerBase].[TransactionCurrencyId] = [transactioncurrency_opportunityclose].[TransactionCurrencyId])
left join OwnerBase XXowner with(nolock) on ([ActivityPointerBase].OwnerId = XXowner.OwnerId)
where [ActivityPointerBase].[ActivityTypeCode] = 4208