QueryBuildDataSource Class

The QueryBuildDataSource class provides the building blocks that queries are made of. Datasources are arranged in hierarchies that define the sequence in which records are fetched from the tables that are assigned to the datasources. Each datasource defines the order in which the records are fetched, in addition to the criteria that must be met by the selected records.


class QueryBuildDataSource extends TreeNode

Called

Method

Description

addDataSource

Adds a data source embedded within this data source.

addDynalink

addGroupByField

addLink

addOrderByField

addRange

Adds a range to the data source.

addRelation

addSelectionField

addSortField

addSortIndex

allowAdd

AOTadd

Creates a subnode to the tree node in the Application Object Tree (AOT). The type of subnode depends on where you are in the tree. The new node acquires the name that was passed as a parameter. (Inherited from TreeNode.)

AOTaddExtendedDataType

This method is not supported in Microsoft Dynamics AX. If you need to add a subnode of this type, use the TreeNode.AOTaddSubNode Method instead. (Inherited from TreeNode.)

AOTaddRelation

This method is not supported in Microsoft Dynamics AX. If you need to add a subnode of this type, use the TreeNode.AOTaddSubNode Method instead. (Inherited from TreeNode.)

AOTaddSubNode

Creates subnodes for extended data types and relations. (Inherited from TreeNode.)

AOTAllowEdit

(Inherited from TreeNode.)

AOTApplCodeDocType

Returns the ApplCodeDocType of the TreeNode object. (Inherited from TreeNode.)

AOTApplHelpType

(Inherited from TreeNode.)

AOTbitmapId

Returns the resource ID of the bitmap of the tree node. (Inherited from TreeNode.)

AOTchildNodeCount

Counts the number of child nodes that a given tree node has. (Inherited from TreeNode.)

AOTcompile

Compiles this node and its subnodes. (Inherited from TreeNode.)

AOTconfigure

(Inherited from TreeNode.)

AOTdelete

Deletes the tree node in the development layer that you are currently working in. (Inherited from TreeNode.)

AOTDrop

Creates a copy of a specified tree node as a child to the TreeNode object. (Inherited from TreeNode.)

AOTDuplicate

(Inherited from TreeNode.)

AOTedit

Opens the appropriate editor for this node. (Inherited from TreeNode.)

AOTfindChild

Finds the specified child node of this node. (Inherited from TreeNode.)

AOTfirstChild

Retrieves the first child of the tree node. (Inherited from TreeNode.)

AOTfirstChildEx

(Inherited from TreeNode.)

AOTgetNodeType

(Inherited from TreeNode.)

AOTgetProperties

Returns a string containing the properties of the tree node. (Inherited from TreeNode.)

AOTgetPropertiesExt

(Inherited from TreeNode.)

AOTgetProperty

(Inherited from TreeNode.)

AOTgetSource

Returns the source code of this node. (Inherited from TreeNode.)

AOTinsert

Inserts a node among the subnodes of this node. (Inherited from TreeNode.)

AOTIsDirty

(Inherited from TreeNode.)

AOTIsOld

Indicates whether this node is from a file found in the "old" directory. (Inherited from TreeNode.)

AOTIsSavedInAODFile

(Inherited from TreeNode.)

AOTiterator

Returns an object which can be used to traverse the child nodes of the tree node. (Inherited from TreeNode.)

AOTKernelHelpType

(Inherited from TreeNode.)

AOTload

Ensures that the object is loaded. (Inherited from TreeNode.)

AOTmakeXref

Compiles this node and its subtree in the AOT, updating the cross-reference system. (Inherited from TreeNode.)

AOTmessageLine

Writes text to the Application Object Tree (AOT) Message window. (Inherited from TreeNode.)

AOTMove

(Inherited from TreeNode.)

AOTname

Returns the value of the name property of the node. (Inherited from TreeNode.)

AOTnewWindow

Opens a new AOT tree window with the tree node as the root. (Inherited from TreeNode.)

AOTnextSibling

Returns the next node on the same level as the tree node. (Inherited from TreeNode.)

AOTObjectNode

Indicates whether the node is an application object. (Inherited from TreeNode.)

AOToverlayBitmapId

Returns the resource ID of the overlay in the AOT associated with this node. (Inherited from TreeNode.)

AOTparent

Returns the parent node of the tree node. (Inherited from TreeNode.)

AOTprevious

Returns the previous sibling of this tree node. (Inherited from TreeNode.)

AOTrefresh

Refreshes the node with the latest changes to the .aod file. (Inherited from TreeNode.)

AOTregenerate

(Inherited from TreeNode.)

AOTrestore

Reloads this node from the disk, if applicable. (Inherited from TreeNode.)

AOTrun

Compiles this node and its subtree in the Application Object Tree (AOT). (Inherited from TreeNode.)

AOTsave

Saves an Application Object Tree (AOT) node. The node is not saved to the database. (Inherited from TreeNode.)

AOTsetProperties

(Inherited from TreeNode.)

AOTsetPropertiesExt

(Inherited from TreeNode.)

AOTsetProperty

(Inherited from TreeNode.)

AOTsetSource

Sets the source code of this node. (Inherited from TreeNode.)

AOTshowProperties

Opens the property sheet (if not already open) and shows the properties for this node. (Inherited from TreeNode.)

AOTtoolTip

Returns the tool tip associated with the tree node. (Inherited from TreeNode.)

AOTToString

TBD (Inherited from TreeNode.)

AOTtypeStr

Returns the internal string code for the element type used in projects. (Inherited from TreeNode.)

AOTUtilFileType

Retrieves the value of the UtilFileType enum for the TreeNode object. The UtilFileType indicates which kind of file the application object is stored in. (Inherited from TreeNode.)

applObjectId

Returns the application object ID, if applicable. (Inherited from TreeNode.)

applObjectLayer

Returns the application object layer of the tree node. (Inherited from TreeNode.)

applObjectLayerMask

Returns a bitmask that specifies which layers contain this element. (Inherited from TreeNode.)

applObjectOldLayerMask

(Inherited from TreeNode.)

applObjectParentHdl

Returns the handle of the tree node's parent, if applicable. (Inherited from TreeNode.)

applObjectType

Returns the application object type for this node (form, report, class). (Inherited from TreeNode.)

autoHeader

autoHeaderDetailLevel

autoSum

autoSumDetailLevel

cancelTimeOut

Cancels a previous method call to the Object.setTimeOut Method. (Inherited from Object.)

childDataSourceCount

childDataSourceNo

clearDynalinks

clearLinks

clearRange

clearRanges

Deletes all ranges that are associated with the data source.

clearSortIndex

company

concurrencyModel

dynalink

dynalinkCount

embedded

enabled

equal

Determines whether the specified object is equal to the current one. (Inherited from Object.)

fetchMode

fields

file

finalize

findRange

firstFast

firstOnly

getNodeInLayer

Retrieves a version of the tree node from a specified layer. (Inherited from TreeNode.)

getTimeOutTimerHandle

Returns the timer handle for the object. (Inherited from Object.)

handle

Retrieves the handle of the class of the object. (Inherited from Object.)

id

indexIsHint

isPartOfSubQueryInBaseQuery

joined

joinedDataSources

joinMode

label

level

link

linkCount

linkFields

makeCopy

(Inherited from TreeNode.)

name

new

Initializes a new instance of the TreeNode class. (Inherited from TreeNode.)

newObjectName

Returns a string that contains the name of the new element. (Inherited from TreeNode.)

notify

Releases the hold on an object that has called a wait method on this object. (Inherited from Object.)

notifyAll

Releases a lock on the object that was issued by a wait method on this object. (Inherited from Object.)

objectOnServer

Determines whether the object is on a server. (Inherited from Object.)

oneToOneDataSources

orderMode

owner

Returns the instance that owns the object. (Inherited from Object.)

parentDataSource

range

rangeCount

rangeField

relations

selectionCount

selectWithRepeatableRead

setTimeOut

Sets up the scheduled execution of a specified method. (Inherited from Object.)

sortClear

sortDirection

sortField

sortFieldCount

sortIndex

sortIndexCount

sysNodeType

Returns the internal node type of this node. (Inherited from TreeNode.)

sysUtilDelete

Deletes the application object in the object database, but does not delete the tree node itself. (Inherited from TreeNode.)

table

toString

Overridden. TBD

treeNodeExport

Exports this node and its subtree from the Application Object Tree (AOT). (Inherited from TreeNode.)

treeNodeName

Returns the name of the tree node. (Inherited from TreeNode.)

treeNodePath

Returns the unique path to the tree node within the Application Object Tree (AOT). (Inherited from TreeNode.)

treeNodeRelease

Releases the tree node explicitly. (Inherited from TreeNode.)

unionType

uniqueId

update

usageCount

Returns the current number of references (the value of the reference counter) that the object has. (Inherited from Object.)

wait

Pauses a process. (Inherited from Object.)

xml

Returns an XML string that represents the current object. (Inherited from Object.)

This class enables you to create, read, update, and delete X++ code and metadata. Make sure that the user has access to the development security key (SysDevelopment) before calling this API.

{
    Query q = new Query();
    QueryBuildDataSource ds = new QueryBuildDataSource();
    ;
    if ( hasSecurityKeyAccess(securityKeyNum(SysDevelopment), 
        AccessType::Edit) )
    {
        ds = q.addDataSource(TableNum(CustTable));
    }
}

Community Additions

ADD
Show: