SavedQuery Entity Reference

Saved query against the database.

Messages

Message Web API Operation SDK Assembly
Create POST [org URI]/api/data/v9.0/savedqueries
See Create
CreateRequest or
Create
Delete DELETE [org URI]/api/data/v9.0/savedqueries(savedqueryid)
See Delete
DeleteRequest or
Delete
ExecuteByIdSavedQuery Retrieve and execute predefined queries ExecuteByIdSavedQueryRequest
InstantiateFilters InstantiateFilters Action InstantiateFiltersRequest
msdyn_IsProjectTemplatesView msdyn_IsProjectTemplatesView Action Type generated by CrmSvcUtil.exe or use OrganizationRequest setting the required parameters for the message.
Retrieve GET [org URI]/api/data/v9.0/savedqueries(savedqueryid)
See Retrieve
RetrieveRequest or
Retrieve
RetrieveMultiple GET [org URI]/api/data/v9.0/savedqueries
See Query Data
RetrieveMultipleRequest or
RetrieveMultiple
RetrieveUnpublished RetrieveUnpublished Function RetrieveUnpublishedRequest
RetrieveUnpublishedMultiple RetrieveUnpublishedMultiple Function RetrieveUnpublishedMultipleRequest
SetState PATCH [org URI]/api/data/v9.0/savedqueries(savedqueryid)
Update statecode and statuscode properties.
SetStateRequest
Update PATCH [org URI]/api/data/v9.0/savedqueries(savedqueryid)
See Update
UpdateRequest or
Update
Validate Validate Action ValidateRequest
ValidateSavedQuery ValidateSavedQuery Action ValidateSavedQueryRequest

Entity Properties

Property Value
CollectionSchemaName SavedQueries
DisplayCollectionName Views
DisplayName View
EntitySetName savedqueries
IsBPFEntity False
LogicalCollectionName savedqueries
LogicalName savedquery
OwnershipType OrganizationOwned
PrimaryIdAttribute savedqueryid
PrimaryNameAttribute name
SchemaName SavedQuery

Writable attributes

These attributes return true for either IsValidForCreate or IsValidForUpdate (usually both). Listed by SchemaName.

AdvancedGroupBy

Property Value
Description Type the column name that will be used to group the results from the data collected across multiple records from a system view.
DisplayName Advanced Group By
FormatName TextArea
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName advancedgroupby
MaxLength 2000
RequiredLevel None
Type String

CanBeDeleted

Property Value
Description Tells whether the view can be deleted.
DisplayName Can Be Deleted
IsValidForForm False
IsValidForRead True
LogicalName canbedeleted
RequiredLevel SystemRequired
Type ManagedProperty

ColumnSetXml

Property Value
Description Contains the columns and sorting criteria for the view, stored in XML format.
DisplayName Column Set XML
Format TextArea
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName columnsetxml
MaxLength 1073741823
RequiredLevel None
Type Memo

ConditionalFormatting

Property Value
Description Type information about how the items in the system view are formatted.
DisplayName Conditional formatting
Format TextArea
IsLocalizable False
IsValidForCreate False
IsValidForForm False
IsValidForRead True
LogicalName conditionalformatting
MaxLength 1073741823
RequiredLevel None
Type Memo

Description

Property Value
Description Type additional information to describe the view, such as the filter criteria or intended results set.
DisplayName Description
Format Text
IsLocalizable True
IsValidForForm False
IsValidForRead True
LogicalName description
MaxLength 2000
RequiredLevel None
Type Memo

FetchXml

Property Value
Description String specifying the query in Fetch XML language.
DisplayName Fetch XML
Format TextArea
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName fetchxml
MaxLength 1073741823
RequiredLevel None
Type Memo

IntroducedVersion

Property Value
Description Version in which the form is introduced.
DisplayName Introduced Version
FormatName VersionNumber
IsLocalizable False
IsValidForForm False
IsValidForRead True
IsValidForUpdate False
LogicalName introducedversion
MaxLength 48
RequiredLevel None
Type String

IsCustomizable

Property Value
Description Tells whether the component can be customized.
DisplayName Customizable
IsValidForForm False
IsValidForRead True
LogicalName iscustomizable
RequiredLevel SystemRequired
Type ManagedProperty

IsDefault

Property Value
Description Tells whether the view is the default view for the specified record type (entity).
DisplayName Default
IsValidForForm False
IsValidForRead True
LogicalName isdefault
RequiredLevel SystemRequired
Type Boolean

IsDefault Options

Value Label
1 Yes
0 No

DefaultValue: False

IsQuickFindQuery

Property Value
Description Choose whether the view is compatible with Quick Find. When users search for specific items, you define the fields that are searched in.
DisplayName Quick Find Compatible
IsValidForForm False
IsValidForRead True
LogicalName isquickfindquery
RequiredLevel SystemRequired
Type Boolean

IsQuickFindQuery Options

Value Label
1 Yes
0 No

DefaultValue: False

LayoutJson

Property Value
Description Layout data in JSON format.
DisplayName Layout data in JSON format.
Format TextArea
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName layoutjson
MaxLength 1073741823
RequiredLevel None
Type Memo

LayoutXml

Property Value
Description For internal use only.
DisplayName Layout XML
Format TextArea
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName layoutxml
MaxLength 1073741823
RequiredLevel None
Type Memo

Name

Property Value
Description Type a name for the view to describe what results the view will contain. This name is visible to users in the View list.
DisplayName Name
FormatName Text
IsLocalizable True
IsValidForForm False
IsValidForRead True
LogicalName name
MaxLength 200
RequiredLevel SystemRequired
Type String

OfflineSqlQuery

Property Value
Description String specifying the corresponding sql query for the fetch xml specified for offline use.
DisplayName Offline SQL Query
Format TextArea
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName offlinesqlquery
MaxLength 1073741823
RequiredLevel None
Type Memo

QueryAppUsage

Property Value
Description For internal use only.
DisplayName Query Application Usage
Format None
IsValidForForm False
IsValidForRead True
LogicalName queryappusage
MaxValue 1000000000
MinValue 0
RequiredLevel None
Type Integer

QueryType

Property Value
Description Shows the type of the query.
DisplayName Query Type
Format None
IsValidForForm False
IsValidForRead True
LogicalName querytype
MaxValue 1000000000
MinValue 0
RequiredLevel SystemRequired
Type Integer

ReturnedTypeCode

Property Value
Description Type of entity displayed in the view.
DisplayName Entity Name
IsValidForForm False
IsValidForRead True
LogicalName returnedtypecode
RequiredLevel SystemRequired
Type EntityName

SavedQueryId

Property Value
Description Unique identifier of the view.
DisplayName View
IsValidForForm False
IsValidForRead True
IsValidForUpdate False
LogicalName savedqueryid
RequiredLevel SystemRequired
Type Uniqueidentifier

StateCode

Property Value
Description Shows the status of the view.
DisplayName Status
IsValidForCreate False
IsValidForForm True
IsValidForRead True
LogicalName statecode
RequiredLevel SystemRequired
Type State

StateCode Options

Value Label DefaultStatus InvariantName
0 Active 1 Active
1 Inactive 2 Inactive

StatusCode

Property Value
Description Shows the reason code that explains the status of the record.
DisplayName Status Reason
IsValidForForm True
IsValidForRead True
LogicalName statuscode
RequiredLevel None
Type Status

StatusCode Options

Value Label State
1 Active 0
2 Inactive 1

Read-only attributes

These attributes return false for both IsValidForCreate or IsValidForUpdate. Listed by SchemaName.

ComponentState

Property Value
Description For internal use only.
DisplayName Component State
IsValidForForm False
IsValidForRead True
LogicalName componentstate
RequiredLevel SystemRequired
Type Picklist

ComponentState Options

Value Label
0 Published
1 Unpublished
2 Deleted
3 Deleted Unpublished

CreatedBy

Property Value
Description Shows who created the record.
DisplayName Created By
IsValidForForm False
IsValidForRead True
LogicalName createdby
RequiredLevel None
Targets systemuser
Type Lookup

CreatedByName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName createdbyname
MaxLength 100
RequiredLevel None
Type String

CreatedByYomiName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName createdbyyominame
MaxLength 100
RequiredLevel None
Type String

CreatedOn

Property Value
DateTimeBehavior UserLocal
Description Shows the date and time when the record was created. The date and time are displayed in the time zone selected in Microsoft Dynamics 365 options.
DisplayName Created On
Format DateAndTime
IsValidForForm False
IsValidForRead True
LogicalName createdon
RequiredLevel None
Type DateTime

CreatedOnBehalfBy

Property Value
Description Shows who created the record on behalf of another user.
DisplayName Created By (Delegate)
IsValidForForm False
IsValidForRead True
LogicalName createdonbehalfby
RequiredLevel None
Targets systemuser
Type Lookup

CreatedOnBehalfByName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName createdonbehalfbyname
MaxLength 100
RequiredLevel None
Type String

CreatedOnBehalfByYomiName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName createdonbehalfbyyominame
MaxLength 100
RequiredLevel None
Type String

IsCustom

Property Value
Description Tells whether a user created the view.
DisplayName Is Custom
IsValidForForm False
IsValidForRead True
LogicalName iscustom
RequiredLevel SystemRequired
Type Boolean

IsCustom Options

Value Label
1 Yes
0 No

DefaultValue: True

IsManaged

Property Value
Description Tells whether the record is part of a managed solution.
DisplayName State
IsValidForForm False
IsValidForRead True
LogicalName ismanaged
RequiredLevel SystemRequired
Type Boolean

IsManaged Options

Value Label
1 Managed
0 Unmanaged

DefaultValue: False

IsPrivate

Property Value
Description Indicates whether or not this is viewable by the entire organization.
DisplayName Is Private
IsValidForForm False
IsValidForRead True
LogicalName isprivate
RequiredLevel SystemRequired
Type Boolean

IsPrivate Options

Value Label
1 Yes
0 No

DefaultValue: False

IsUserDefined

Property Value
Description Tells whether the view was created by a user.
DisplayName User Defined
IsValidForForm False
IsValidForRead True
LogicalName isuserdefined
RequiredLevel None
Type Boolean

IsUserDefined Options

Value Label
1 Yes
0 No

DefaultValue: True

ModifiedBy

Property Value
Description Shows who last updated the record.
DisplayName Modified By
IsValidForForm False
IsValidForRead True
LogicalName modifiedby
RequiredLevel None
Targets systemuser
Type Lookup

ModifiedByName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName modifiedbyname
MaxLength 100
RequiredLevel None
Type String

ModifiedByYomiName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName modifiedbyyominame
MaxLength 100
RequiredLevel None
Type String

ModifiedOn

Property Value
DateTimeBehavior UserLocal
Description Shows the date and time when the record was last updated. The date and time are displayed in the time zone selected in Microsoft Dynamics 365 options.
DisplayName Modified On
Format DateAndTime
IsValidForForm False
IsValidForRead True
LogicalName modifiedon
RequiredLevel None
Type DateTime

ModifiedOnBehalfBy

Property Value
Description Shows who last updated the record on behalf of another user.
DisplayName Modified By (Delegate)
IsValidForForm False
IsValidForRead True
LogicalName modifiedonbehalfby
RequiredLevel None
Targets systemuser
Type Lookup

ModifiedOnBehalfByName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName modifiedonbehalfbyname
MaxLength 100
RequiredLevel None
Type String

ModifiedOnBehalfByYomiName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName modifiedonbehalfbyyominame
MaxLength 100
RequiredLevel None
Type String

OrganizationId

Property Value
Description Choose the ID of the organization that the record is associated with.
DisplayName Organization
IsValidForForm False
IsValidForRead True
LogicalName organizationid
RequiredLevel SystemRequired
Targets organization
Type Lookup

OrganizationIdName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName organizationidname
MaxLength 100
RequiredLevel SystemRequired
Type String

OrganizationTabOrder

Property Value
Description For the organization, type the tab order to determine how users navigate through the screen using only the Tab key.
DisplayName Default Organization tab order
Format None
IsValidForForm False
IsValidForRead True
LogicalName organizationtaborder
MaxValue 2147483647
MinValue 0
RequiredLevel None
Type Integer

OverwriteTime

Property Value
DateTimeBehavior UserLocal
Description For internal use only.
DisplayName Record Overwrite Time
Format DateOnly
IsValidForForm False
IsValidForRead True
LogicalName overwritetime
RequiredLevel SystemRequired
Type DateTime

QueryAPI

Property Value
Description For internal use only.
DisplayName Query API
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName queryapi
MaxLength 100
RequiredLevel None
Type String

SavedQueryIdUnique

Property Value
Description For internal use only.
DisplayName
IsValidForForm False
IsValidForRead True
LogicalName savedqueryidunique
RequiredLevel SystemRequired
Type Uniqueidentifier

SolutionId

Property Value
Description Unique identifier of the associated solution.
DisplayName Solution
IsValidForForm False
IsValidForRead True
LogicalName solutionid
RequiredLevel SystemRequired
Type Uniqueidentifier

SupportingSolutionId

Property Value
Description For internal use only.
DisplayName Solution
IsValidForForm False
IsValidForRead False
LogicalName supportingsolutionid
RequiredLevel None
Type Uniqueidentifier

VersionNumber

Property Value
Description Version number of the view.
DisplayName Version Number
IsValidForForm False
IsValidForRead True
LogicalName versionnumber
MaxValue 9223372036854775807
MinValue -9223372036854775808
RequiredLevel None
Type BigInt

One-To-Many Relationships

Listed by SchemaName.

SavedQuery_SyncErrors

Same as syncerror entity SavedQuery_SyncErrors Many-To-One relationship.

Property Value
ReferencingEntity syncerror
ReferencingAttribute regardingobjectid
IsHierarchical False
IsCustomizable True
ReferencedEntityNavigationPropertyName SavedQuery_SyncErrors
AssociatedMenuConfiguration Behavior: DoNotDisplay
Group: Details
Label:
Order:
CascadeConfiguration Assign: Cascade
Delete: Cascade
Merge: Cascade
Reparent: Cascade
Share: Cascade
Unshare: Cascade

userentityinstancedata_savedquery

Same as userentityinstancedata entity userentityinstancedata_savedquery Many-To-One relationship.

Property Value
ReferencingEntity userentityinstancedata
ReferencingAttribute objectid
IsHierarchical False
IsCustomizable False
ReferencedEntityNavigationPropertyName userentityinstancedata_savedquery
AssociatedMenuConfiguration Behavior: DoNotDisplay
Group: Details
Label:
Order:
CascadeConfiguration Assign: NoCascade
Delete: Cascade
Merge: NoCascade
Reparent: NoCascade
Share: NoCascade
Unshare: NoCascade

lk_mobileofflineprofileitem_savedquery

Same as mobileofflineprofileitem entity lk_mobileofflineprofileitem_savedquery Many-To-One relationship.

Property Value
ReferencingEntity mobileofflineprofileitem
ReferencingAttribute profileitemrule
IsHierarchical False
IsCustomizable False
ReferencedEntityNavigationPropertyName lk_mobileofflineprofileitem_savedquery
AssociatedMenuConfiguration Behavior: DoNotDisplay
Group: Details
Label:
Order:
CascadeConfiguration Assign: NoCascade
Delete: Restrict
Merge: NoCascade
Reparent: NoCascade
Share: NoCascade
Unshare: NoCascade

SavedQuery_BulkDeleteFailures

Same as bulkdeletefailure entity SavedQuery_BulkDeleteFailures Many-To-One relationship.

Property Value
ReferencingEntity bulkdeletefailure
ReferencingAttribute regardingobjectid
IsHierarchical False
IsCustomizable False
ReferencedEntityNavigationPropertyName SavedQuery_BulkDeleteFailures
AssociatedMenuConfiguration Behavior: DoNotDisplay
Group: Details
Label:
Order:
CascadeConfiguration Assign: NoCascade
Delete: Cascade
Merge: NoCascade
Reparent: NoCascade
Share: NoCascade
Unshare: NoCascade

SavedQuery_AsyncOperations

Same as asyncoperation entity SavedQuery_AsyncOperations Many-To-One relationship.

Property Value
ReferencingEntity asyncoperation
ReferencingAttribute regardingobjectid
IsHierarchical False
IsCustomizable False
ReferencedEntityNavigationPropertyName SavedQuery_AsyncOperations
AssociatedMenuConfiguration Behavior: DoNotDisplay
Group: Details
Label:
Order:
CascadeConfiguration Assign: NoCascade
Delete: NoCascade
Merge: NoCascade
Reparent: NoCascade
Share: NoCascade
Unshare: NoCascade

Many-To-One Relationships

Each Many-To-One relationship is defined by a corresponding One-To-Many relationship with the related entity. Listed by SchemaName.

lk_savedquery_modifiedonbehalfby

See systemuser Entity lk_savedquery_modifiedonbehalfby One-To-Many relationship.

lk_savedquerybase_createdby

See systemuser Entity lk_savedquerybase_createdby One-To-Many relationship.

lk_savedquerybase_modifiedby

See systemuser Entity lk_savedquerybase_modifiedby One-To-Many relationship.

organization_saved_queries

See organization Entity organization_saved_queries One-To-Many relationship.

lk_savedquery_createdonbehalfby

See systemuser Entity lk_savedquery_createdonbehalfby One-To-Many relationship.

See also

About the Entity Reference
Programming reference for Dynamics 365 Customer Engagement
Web API Reference
savedquery EntityType