Here is the documentation EntityMetadata EntityType where all the properties of an entity are described.
I can not find any property that can describe the possibility to create a record of this entity type there.
How can I figure out that this entity type supports the creation of records?
As an example - activitypointer EntityType supports only Operations Supported GET
, but in the entity metadata description, there is nothing related to it.
ActivityPointer EntityMetadata
{
"ActivityTypeMask": 1,
"AutoCreateAccessTeams": false,
"AutoRouteToOwnerQueue": false,
"CanBeInCustomEntityAssociation": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canbeincustomentityassociation",
"Value": false
},
"CanBeInManyToMany": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canbeinmanytomany",
"Value": false
},
"CanBePrimaryEntityInRelationship": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canbeprimaryentityinrelationship",
"Value": false
},
"CanBeRelatedEntityInRelationship": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canberelatedentityinrelationship",
"Value": false
},
"CanChangeHierarchicalRelationship": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canchangehierarchicalrelationship",
"Value": false
},
"CanChangeTrackingBeEnabled": {
"CanBeChanged": true,
"ManagedPropertyLogicalName": "canchangetrackingbeenabled",
"Value": true
},
"CanCreateAttributes": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "cancreateattributes",
"Value": false
},
"CanCreateCharts": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "cancreatecharts",
"Value": true
},
"CanCreateForms": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "cancreateforms",
"Value": false
},
"CanCreateViews": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "cancreateviews",
"Value": true
},
"CanEnableSyncToExternalSearchIndex": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canenablesynctoexternalsearchindex",
"Value": false
},
"CanModifyAdditionalSettings": {
"CanBeChanged": true,
"ManagedPropertyLogicalName": "canmodifyadditionalsettings",
"Value": true
},
"CanTriggerWorkflow": false,
"ChangeTrackingEnabled": true,
"CollectionSchemaName": "ActivityPointers",
"DataProviderId": null,
"DataSourceId": null,
"DaysSinceRecordLastModified": 0,
"Description": {
"LocalizedLabels": [
{
"HasChanged": null,
"IsManaged": true,
"Label": "Task performed, or to be performed, by a user. An activity is any action for which an entry can be made on a calendar.",
"LanguageCode": 1033,
"MetadataId": "499709b3-2241-db11-898a-0007e9e17ebd"
}
],
"UserLocalizedLabel": {
"HasChanged": null,
"IsManaged": true,
"Label": "Task performed, or to be performed, by a user. An activity is any action for which an entry can be made on a calendar.",
"LanguageCode": 1033,
"MetadataId": "499709b3-2241-db11-898a-0007e9e17ebd"
}
},
"DisplayCollectionName": {
"LocalizedLabels": [
{
"HasChanged": null,
"IsManaged": true,
"Label": "Activities",
"LanguageCode": 1033,
"MetadataId": "4b9709b3-2241-db11-898a-0007e9e17ebd"
}
],
"UserLocalizedLabel": {
"HasChanged": null,
"IsManaged": true,
"Label": "Activities",
"LanguageCode": 1033,
"MetadataId": "4b9709b3-2241-db11-898a-0007e9e17ebd"
}
},
"DisplayName": {
"LocalizedLabels": [
{
"HasChanged": null,
"IsManaged": true,
"Label": "Activity",
"LanguageCode": 1033,
"MetadataId": "4a9709b3-2241-db11-898a-0007e9e17ebd"
}
],
"UserLocalizedLabel": {
"HasChanged": null,
"IsManaged": true,
"Label": "Activity",
"LanguageCode": 1033,
"MetadataId": "4a9709b3-2241-db11-898a-0007e9e17ebd"
}
},
"EnforceStateTransitions": false,
"EntityColor": "#505050",
"EntityHelpUrl": null,
"EntityHelpUrlEnabled": false,
"EntitySetName": "activitypointers",
"ExternalCollectionName": null,
"ExternalName": null,
"HasActivities": false,
"HasChanged": null,
"HasFeedback": false,
"HasNotes": false,
"IconLargeName": null,
"IconMediumName": null,
"IconSmallName": null,
"IconVectorName": null,
"IntroducedVersion": "5.0.0.0",
"IsAIRUpdated": false,
"IsActivity": false,
"IsActivityParty": false,
"IsAuditEnabled": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifyauditsettings",
"Value": false
},
"IsAvailableOffline": true,
"IsBPFEntity": false,
"IsBusinessProcessEnabled": false,
"IsChildEntity": false,
"IsConnectionsEnabled": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifyconnectionsettings",
"Value": true
},
"IsCustomEntity": false,
"IsCustomizable": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "iscustomizable",
"Value": true
},
"IsDocumentManagementEnabled": false,
"IsDocumentRecommendationsEnabled": false,
"IsDuplicateDetectionEnabled": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifyduplicatedetectionsettings",
"Value": false
},
"IsEnabledForCharts": true,
"IsEnabledForExternalChannels": false,
"IsEnabledForTrace": false,
"IsImportable": false,
"IsInteractionCentricEnabled": true,
"IsIntersect": false,
"IsKnowledgeManagementEnabled": false,
"IsLogicalEntity": false,
"IsMSTeamsIntegrationEnabled": false,
"IsMailMergeEnabled": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifymailmergesettings",
"Value": false
},
"IsManaged": true,
"IsMappable": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "ismappable",
"Value": false
},
"IsOfflineInMobileClient": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifymobileclientoffline",
"Value": false
},
"IsOneNoteIntegrationEnabled": false,
"IsOptimisticConcurrencyEnabled": true,
"IsPrivate": false,
"IsQuickCreateEnabled": false,
"IsReadOnlyInMobileClient": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifymobileclientreadonly",
"Value": false
},
"IsReadingPaneEnabled": true,
"IsRenameable": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "isrenameable",
"Value": true
},
"IsSLAEnabled": false,
"IsSolutionAware": false,
"IsStateModelAware": false,
"IsValidForAdvancedFind": true,
"IsValidForQueue": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifyqueuesettings",
"Value": false
},
"IsVisibleInMobile": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifymobilevisibility",
"Value": false
},
"IsVisibleInMobileClient": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifymobileclientvisibility",
"Value": true
},
"LogicalCollectionName": "activitypointers",
"LogicalName": "activitypointer",
"MetadataId": "c821cd41-f315-43d1-8fa6-82787b6f06e7",
"MobileOfflineFilters": "",
"ObjectTypeCode": 4200,
"OwnershipType": "UserOwned",
"PrimaryIdAttribute": "activityid",
"PrimaryImageAttribute": null,
"PrimaryNameAttribute": "subject",
"Privileges": [
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvCreateActivity",
"PrivilegeId": "091df793-fe5e-44d4-b4ca-7e3f580c4664",
"PrivilegeType": "Create"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvReadActivity",
"PrivilegeId": "650c14fe-3521-45fe-a000-84138688e45d",
"PrivilegeType": "Read"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvWriteActivity",
"PrivilegeId": "0dc8f72c-57d5-4b4d-8892-fe6aac0e4b81",
"PrivilegeType": "Write"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvDeleteActivity",
"PrivilegeId": "bb4457f2-9b45-4482-a95a-7adef25f388a",
"PrivilegeType": "Delete"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvAssignActivity",
"PrivilegeId": "8b99344e-ebbf-4f84-8438-e1e34d194de9",
"PrivilegeType": "Assign"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvShareActivity",
"PrivilegeId": "b5f2ee06-d359-4495-bbda-312aae1c6b1e",
"PrivilegeType": "Share"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvAppendActivity",
"PrivilegeId": "78777c10-09ab-4326-b4c8-cf5729702937",
"PrivilegeType": "Append"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvAppendToActivity",
"PrivilegeId": "6ec8e901-d770-44c0-8f12-d07425f638bd",
"PrivilegeType": "AppendTo"
}
],
"RecurrenceBaseEntityLogicalName": null,
"ReportViewName": "FilteredActivityPointer",
"SchemaName": "ActivityPointer",
"SyncToExternalSearchIndex": false,
"UsesBusinessDataLabelTable": false
}
I reviewed this and I agree that there is no explicit entity metadata attribute akin to IsCreatable
.
You could wrap an attempt to Create
an empty entity of the type in a try
/ catch
block.
When I ran:
var pointer = new ActivityPointer();
pointer.Create(svc);
The service threw this exception, even though the pointer
entity contains no attributes:
System.ServiceModel.FaultException`1: 'The 'Create' method does not support entities of type 'activitypointer'.'
This article lists the entities that support the IOrganizationService Create
method under "Supported Entities".
Here is the list:
Account
ActivityMimeAttachment
Annotation
AnnualFiscalCalendar
Appointment
AsyncOperation
AttributeMap
BusinessUnit
BusinessUnitNewsArticle
Calendar
Campaign
CampaignActivity
CampaignResponse
ColumnMapping
Competitor
Connection
ConnectionRole
ConnectionRoleObjectTypeCode
ConstraintBasedGroup
Contact
Contract
ContractDetail
ContractTemplate
ConvertRule
ConvertRuleItem
CustomerAddress
CustomerOpportunityRole
CustomerRelationship
Discount
DiscountType
DuplicateRule
DuplicateRuleCondition
DynamicProperty
DynamicPropertyAssociation
DynamicPropertyInstance
DynamicPropertyOptionSetItem
Email
EmailServerProfile
Entitlement
EntitlementChannel
EntitlementTemplate
EntitlementTemplateChannel
Equipment
ExchangeSyncIdMapping
Fax
FieldPermission
FieldSecurityProfile
FixedMonthlyFiscalCalendar
Goal
GoalRollupQuery
HierarchyRule
HierarchySecurityConfiguration
Import
ImportEntityMapping
ImportFile
ImportJob
ImportMap
Incident
IncidentResolution
Invoice
InvoiceDetail
IsvConfig
KbArticle
KbArticleComment
KbArticleTemplate
Lead
Letter
List
LookUpMapping
Mailbox
MailMergeTemplate
Metric
MonthlyFiscalCalendar
msdyn_PostAlbum
msdyn_PostConfig
msdyn_PostRuleConfig
msdyn_wallsavedquery
msdyn_wallsavedqueryusersettings
Opportunity
OpportunityClose
OpportunityProduct
OrderClose
OrganizationUI
OwnerMapping
PhoneCall
PickListMapping
PluginAssembly
PluginType
Position
Post
PostComment
PostFollow
PostLike
PriceLevel
PrincipalObjectAttributeAccess
ProcessSession
ProcessTrigger
Product
ProductAssociation
ProductPriceLevel
ProductSubstitute
Publisher
PublisherAddress
QuarterlyFiscalCalendar
Queue
QueueItem
Quote
QuoteClose
QuoteDetail
RecurrenceRule
RecurringAppointmentMaster
RelationshipRole
RelationshipRoleMap
Report
ReportCategory
ReportEntity
ReportVisibility
ResourceSpec
Role
RollupField
RoutingRule
RoutingRuleItem
SalesLiterature
SalesLiteratureItem
SalesOrder
SalesOrderDetail
SavedQuery
SavedQueryVisualization
SdkMessageProcessingStep
SdkMessageProcessingStepImage
SdkMessageProcessingStepSecureConfig
SemiAnnualFiscalCalendar
Service
ServiceAppointment
ServiceEndpoint
SharePointDocument
SharePointDocumentLocation
SharePointSite
Site
SLA
SLAItem
SLAKPIInstance
SocialActivity
SocialInsightsConfiguration
SocialProfile
Solution
Subject
SystemForm
SystemUser
Task
Team
TeamTemplate
Template
Territory
TraceLog
TransactionCurrency
TransformationMapping
TransformationParameterMapping
UoM
UoMSchedule
UserEntityInstanceData
UserEntityUISettings
UserForm
UserQuery
UserQueryVisualization
WebResource
Workflow
WorkflowDependency
WorkflowLog