FormDataSource Class

Definition

The FormDataSource class contains properties that define the behavior of data sources in forms.

public ref class FormDataSource : Dynamics::AX::Application::FormObjectSet
[Microsoft.Dynamics.Ax.Xpp.KernelClass]
public class FormDataSource : Dynamics.AX.Application.FormObjectSet
[<Microsoft.Dynamics.Ax.Xpp.KernelClass>]
type FormDataSource = class
    inherit FormObjectSet
Public Class FormDataSource
Inherits FormObjectSet
Inheritance
Microsoft.Dynamics.AX.KernelInterop.ProxyBase
FormDataSource
Attributes

Remarks

By overriding the methods on the class, you can customize the behavior for the method actions, such as insertion or validation, for a specific form. The FormDataSource class is also used to determine how the data source table is related to other data sources (tables) that are displayed in the form. To override some of the methods in the FormDataSource class, right-click the Methods node for a form data source, and then click Override Method. When you create methods on a form, you should use a _ds identifier to reference the FormDataSource object for a particular class. For example, CustTrans_ds references the FormDataSource object for the CustTrans data source on the form, and CustTrans_ds.executeQuery() executes the FormDataSource.executeQuery method on the CustTrans data source. Several FormDataSource methods return a FormObjectSet object. To use the methods that are defined on the FormDataSource method on this object, you must typecast it to a FormDataSource object.

The following example supplies a custom query for a field instead of the automatically generated query. It overrides the performFormLookup method on the field.

public void performFormLookup(FormRun _p1, FormControl _formControl)  
{ 
    FormDataSource formDataSource; 
    QueryRun queryRunGenerated; 
    // The FormDataSource object retrieved from the FormRun parameter. 
    formDataSource = _p1.dataSource(1); 
    // Get the generated query. 
    queryRunGenerated = formDataSource.queryRun(); 
    // Modify the query. 
    // ... 
    // Call the standard implementation of performFormLookup 
    // with the parameters supplied in this method. 
    super(_p1, _formControl); 
}

Constructors

FormDataSource()
FormDataSource(IntPtr)

Fields

__k_FormDataSourceId
kernelClass (Inherited from XppObjectBase)
observer

Methods

__active_IntImpl__()
__addFieldToSelectionList_IntImpl__(Int32)
__addReferenceFieldToSelectionList_IntImpl__(Int32, String)
__allowCheck_IntImpl__()
__allowCheck_IntImpl__(Boolean)
__allowCreate_IntImpl__()
__allowCreate_IntImpl__(Boolean)
__allowDeferredLoad_IntImpl__()
__allowDeferredLoad_IntImpl__(Boolean)
__allowDelete_IntImpl__()
__allowDelete_IntImpl__(Boolean)
__allowEdit_IntImpl__()
__allowEdit_IntImpl__(Boolean)
__allRowsLoaded_IntImpl__()
__anyMarked_IntImpl__()
__autoNotify_IntImpl__()
__autoNotify_IntImpl__(Boolean)
__autoQuery_IntImpl__()
__autoQuery_IntImpl__(Boolean)
__autoSearch_IntImpl__()
__autoSearch_IntImpl__(Boolean)
__bindDataMethod_IntImpl__(String)
__bindField_IntImpl__(Int32)
__cacheAddMethod_IntImpl__(String, Boolean)
__cacheAddMethod_IntImpl__(String)
__cacheCalculateMethod_IntImpl__(String)
__cacheOnlyMode_IntImpl__()
__cacheOnlyMode_IntImpl__(Boolean)
__cacheRemoveRecord_IntImpl__()
__cacheRemoveRecord_IntImpl__(Common)
__canCreate_IntImpl__()
__canDelete_IntImpl__()
__canEdit_IntImpl__()
__clearDisplayOption_IntImpl__(Common)
__clearReferenceData_IntImpl__(Int32)
__clientPageSize_IntImpl__()
__clientPageSize_IntImpl__(Int32)
__company_IntImpl__()
__company_IntImpl__(String)
__counterField_IntImpl__()
__counterField_IntImpl__(Int32)
__create_IntImpl__()
__create_IntImpl__(Boolean)
__createTypes_IntImpl__(Map, Boolean, Boolean, Boolean)
__createTypes_IntImpl__(Map, Boolean, Boolean)
__createTypes_IntImpl__(Map, Boolean)
__createTypes_IntImpl__(Map)
__crossCompanyAutoQuery_IntImpl__()
__crossCompanyAutoQuery_IntImpl__(Boolean)
__cursor_IntImpl__()
__cursor_IntImpl__(Int32)
__cursorNotify_IntImpl__(Int32)
__defaultMark_IntImpl__()
__defaultMark_IntImpl__(Int32)
__delayActive_IntImpl__()
__delayActive_IntImpl__(Boolean)
__delete_IntImpl__()
__deleted_IntImpl__()
__deleteMarked_IntImpl__()
__deleting_IntImpl__()
__displayOption_IntImpl__(Common, FormRowDisplayOption)
__displayOptionHandlers_IntImpl__(Common, FormRowDisplayOption, String, String)
__executeCancelableEvent_IntImpl__(FormDataSourceEventHandler, FormDataSourceCancelEventArgs, Boolean)
__executeCreatingEvent_IntImpl__(FormDataSourceEventHandler, FormDataSourceCreateEventArgs, Boolean)
__executeQuery_IntImpl__()
__extends_IntImpl__()
__extends_IntImpl__(Object)
__filter_IntImpl__(Int32, String)
__findRecord_IntImpl__(Common)
__findValue_IntImpl__(Int32, String)
__first_IntImpl__()
__forceWrite_IntImpl__()
__forceWrite_IntImpl__(Boolean)
__functionObject_IntImpl__(String)
__getDataRow_IntImpl__()
__getDataRow_IntImpl__(Int32, Boolean)
__getDataRow_IntImpl__(Int32)
__getFirst_IntImpl__()
__getFirst_IntImpl__(Int32, Boolean)
__getFirst_IntImpl__(Int32)
__getNext_IntImpl__()
__handle_IntImpl__()
__id_IntImpl__()
__index_IntImpl__()
__index_IntImpl__(Int32)
__init_IntImpl__()
__initValue_IntImpl__()
__insertAtEnd_IntImpl__()
__insertAtEnd_IntImpl__(Boolean)
__insertIfEmpty_IntImpl__()
__insertIfEmpty_IntImpl__(Boolean)
__isBaseDataSource_IntImpl__()
__isInheritanceDataSource_IntImpl__()
__isReferenceDataSource_IntImpl__()
__joinRelation_IntImpl__()
__joinRelation_IntImpl__(String)
__joinRelationAsDictRelation_IntImpl__()
__joinSource_IntImpl__()
__joinSource_IntImpl__(Object)
__joinSourceDataSource_IntImpl__()
__keepQueryRun_IntImpl__(boolean)
__kernelhandle_IntImpl__()
__last_IntImpl__()
__leave_IntImpl__()
__leaveRecord_IntImpl__()
__leaveRecord_IntImpl__(Boolean)
__linkActive_IntImpl__()
__linkType_IntImpl__()
__linkType_IntImpl__(Int32)
__mark_IntImpl__()
__mark_IntImpl__(Int32)
__markAllLoadedRecords_IntImpl__()
__markAllLoadedRecords_IntImpl__(Int32)
__markChanged_IntImpl__()
__markRecord_IntImpl__(Object, Int32)
__markRecord_IntImpl__(Object)
__markRecords_IntImpl__(Array)
__masterInheritanceDataSource_IntImpl__()
__maxAccessRight_IntImpl__()
__maxAccessRight_IntImpl__(Int32)
__maxPagingRowCountValue_IntImpl__()
__maxPagingRowCountValue_IntImpl__(Int64)
__maxRecordsToLoad_IntImpl__()
__maxRecordsToLoad_IntImpl__(Int32)
__name_IntImpl__()
__name_IntImpl__(String)
__next_IntImpl__()
__nextPage_IntImpl__(Int32)
__numberOfRowsLoaded_IntImpl__()
__numberOfRowsLoaded_IntImpl__(Boolean)
__object_IntImpl__(Int32, Int32)
__object_IntImpl__(Int32)
__observe_IntImpl__()
__onCursorCreateEmpty_IntImpl__()
__onlyFetchActive_IntImpl__()
__onlyFetchActive_IntImpl__(Boolean)
__onRecordCountChangeToZero_IntImpl__()
__optionalRecordMode_IntImpl__()
__optionalRecordMode_IntImpl__(Int32)
__pageSize_IntImpl__()
__pagingEnabled_IntImpl__()
__parentTitleFields_IntImpl__(Common)
__positionToRecord_IntImpl__(Common)
__positionToRecordByValue_IntImpl__(Int32, String)
__prev_IntImpl__()
__prevPage_IntImpl__(Int32)
__print_IntImpl__(PrintMedium)
__prompt_IntImpl__()
__query_IntImpl__()
__query_IntImpl__(Query)
__queryBuildDataSource_IntImpl__()
__queryRun_IntImpl__()
__queryRun_IntImpl__(QueryRun)
__queryRunQueryBuildDataSource_IntImpl__()
__recordsMarked_IntImpl__()
__refresh_IntImpl__()
__refreshEx_IntImpl__()
__refreshEx_IntImpl__(Object)
__registerOverrideMethod_IntImpl__(String, String, XppObjectBase)
__registerOverrideMethod_IntImpl__(String, String)
__removeFieldFromSelectionList_IntImpl__(Int32)
__removeFilter_IntImpl__()
__reread_IntImpl__()
__rereadJoinHierarchy_IntImpl__()
__rereadReferenceDataSources_IntImpl__()
__research_IntImpl__()
__research_IntImpl__(Boolean)
__resolvePartLinks_IntImpl__(String, Int32)
__selectionChanged_IntImpl__()
__setCurrent_IntImpl__()
__setExplicitFieldVisibility_IntImpl__(Int32)
__setPagingParameters_IntImpl__(Boolean, Int32, Int32)
__setRecord_IntImpl__(Common)
__shouldCallNew(Type) (Inherited from XppObjectBase)
__startPosition_IntImpl__()
__startPosition_IntImpl__(Int32)
__startRowIndex_IntImpl__()
__table_IntImpl__()
__table_IntImpl__(Int32)
__titleFields_IntImpl__(Common)
__totalNumberOfRows_IntImpl__()
__validateDelete_IntImpl__()
__validateWrite_IntImpl__()
__validTimeStateAutoQuery_IntImpl__()
__validTimeStateAutoQuery_IntImpl__(Int32)
__validTimeStateUpdate_IntImpl__()
__validTimeStateUpdate_IntImpl__(Int32)
__write_IntImpl__()
__writing_IntImpl__()
__written_IntImpl__()
active()

Retrieves data from joined data sources when a user navigates to a new record and then sets the new record as the current record.

addFieldToSelectionList(Int32)
addNotifyHandler(FormObjectSetNotify) (Inherited from FormObjectSet)
addReferenceFieldToSelectionList(Int32, String)
addXppProxyReference(Type, Object) (Inherited from XppObjectBase)
allowCheck()
allowCheck(Boolean)
allowCreate()
allowCreate(Boolean)
allowDeferredLoad()
allowDeferredLoad(Boolean)
allowDelete()
allowDelete(Boolean)
allowEdit()

Determines whether the user can change the contents of the control.

allowEdit(Boolean)
allRowsLoaded()
anyMarked()

Checks whether any records in the underlying cache are marked.

autoNotify()
autoNotify(Boolean)
autoQuery()
autoQuery(Boolean)
autoSearch()
autoSearch(Boolean)
bindDataMethod(String)
bindField(Int32)
cacheAddMethod(String, Boolean)
cacheAddMethod(String)

Registers the specified display or edit method for caching.

cacheCalculateMethod(String)

Calls the specified cached method and updates the value in the cache for the current record.

cacheOnlyMode()
cacheOnlyMode(Boolean)
cacheRemoveRecord()

Removes the specified record from the underlying cache of the data source.

cacheRemoveRecord(Common)
Call(String, Object[], Type[], Object[]) (Inherited from XppObjectBase)
cancelTimeOut(Int32) (Inherited from XppObjectBase)
canCreate()
canDelete()
canEdit()
clearDisplayOption(Common)

Clears display options that were previously specified for a record and then redraws the record.

clearReferenceData(Int32)
clientPageSize()
clientPageSize(Int32)
company()
company(String)
counterField()
counterField(Int32)
create()

Creates a new record in the data source.

create(Boolean)
createKernelClass(Object[], Type[], Object[]) (Inherited from XppObjectBase)
createTypes(Map, Boolean, Boolean, Boolean)
createTypes(Map, Boolean, Boolean)
createTypes(Map, Boolean)
createTypes(Map)
crossCompanyAutoQuery()
crossCompanyAutoQuery(Boolean)
cursor()

Has no functionality in the FormObjectSet class.

cursor(Int32)
cursorNotify(Int32)

Notifies the application about a cursor event.

defaultMark()

Sets the default mark value for records in a form, which determines whether records are marked when they have been selected in a grid.

defaultMark(Int32)
delayActive()
delayActive(Boolean)
delete()

Deletes the current record from the data source.

deleted()
deleteMarked()

Deletes all marked (selected) records from a data source.

deleting()
displayOption(Common, FormRowDisplayOption)

Sets the text color and the background color for a record in the data source.

displayOptionHandlers(Common, FormRowDisplayOption, String, String)
emptyCoCState(String)
equal(XppObjectBase) (Inherited from XppObjectBase)
executeCancelableEvent(FormDataSourceEventHandler, FormDataSourceCancelEventArgs, Boolean)
executeCreatingEvent(FormDataSourceEventHandler, FormDataSourceCreateEventArgs, Boolean)
executeQuery()

Executes the data source query and displays the records that are retrieved.

extends()
extends(Object)
filter(Int32, String)

Filters records in the data source.

finalize() (Inherited from XppObjectBase)
findRecord(Common)

Finds the specified record in the data source and makes it the current record.

findValue(Int32, String)

Finds the specified value in the data source and makes the record that has that value the current record that uses the FormDataSource.findRecord method.

first()

Moves focus to the first record in the data source.

forceWrite()
forceWrite(Boolean)
formRun() (Inherited from FormObjectSet)
functionObject(String)
getCoCState(String)
getDataRow()
getDataRow(Int32, Boolean)
getDataRow(Int32)
getFirst()

Retrieves the first record in a data set.

getFirst(Int32, Boolean)
getFirst(Int32)
getFormRootName()
getFormRun()
GetIntPtr() (Inherited from XppObjectBase)
GetKernelInstanceUniqueId() (Inherited from XppObjectBase)
getNext()

Returns the next record that meets the criteria that are set up in an earlier call to the FormDataSource.getFirst method.

getPosition() (Inherited from FormObjectSet)
getTimeOutTimerHandle() (Inherited from XppObjectBase)
getXppProxyReference(Type) (Inherited from XppObjectBase)
handle()
id()

Retrieves the ID of the data source.

index()
index(Int32)
init()

Creates a data source query that is based on the data source properties.

initValue()

Initializes field values in a new record.

insertAtEnd()
insertAtEnd(Boolean)
insertIfEmpty()
insertIfEmpty(Boolean)
isBaseDataSource()
isInheritanceDataSource()
IsManagedValid() (Inherited from XppObjectBase)
isReferenceDataSource()
joinRelation()
joinRelation(String)
joinRelationAsDictRelation()
joinSource()
joinSource(Object)
joinSourceDataSource()
keepQueryRun(boolean)
kernelhandle()
KernelInstanceDisposed() (Inherited from XppObjectBase)
last()

Moves the mouse pointer to the last record in the data source.

leave()

Provides notification when the mouse pointer is moved to the next record or to another data source.

leaveRecord()

Provides notification when the focus moves to another record or item in the form.

leaveRecord(Boolean)
linkActive()

Calls the FormDataSource.exeuteQuery method on data sources that are linked to the current data source.

linkType()
linkType(Int32)
MakeReflectionCall(String, Object[]) (Inherited from XppObjectBase)
mark()
mark(Int32)
markAllLoadedRecords()
markAllLoadedRecords(Int32)
markChanged()
markRecord(Object, Int32)
markRecord(Object)

Marks the specified record by using the specified mark value.

markRecords(Array)
masterInheritanceDataSource()
masterObjectSet()

Retrieves the master object set for the current object set.

(Inherited from FormObjectSet)
maxAccessRight()
maxAccessRight(Int32)
maxPagingRowCountValue()
maxPagingRowCountValue(Int64)
maxRecordsToLoad()
maxRecordsToLoad(Int32)
name()

Gets or sets the name that is used in code to identify a form, report, table, query, or other Finance and Operations application object.

name(String)
nestedElementName()
newmethod() (Inherited from XppObjectBase)
next()

Moves the focus to the next record in the data source.

nextPage(Int32)

Moves a specified number of records forward in the data source.

notify() (Inherited from XppObjectBase)
notifyAll() (Inherited from XppObjectBase)
numberOfRowsLoaded()
numberOfRowsLoaded(Boolean)
object(Int32, Int32)
object(Int32)

Returns an instance of the FormDataObject class that has the specified ID.

objectOnServer()
Obsolete.
(Inherited from XppObjectBase)
observe()
onCursorCreateEmpty()
onlyFetchActive()
onlyFetchActive(Boolean)
onRecordCountChangeToZero()
optionalRecordMode()
optionalRecordMode(Int32)
pageSize()
pagingEnabled()
parentTitleFields(Common)
positionToRecord(Common)
positionToRecordByValue(Int32, String)
prev()

Moves the focus to the previous record in the data source.

prevPage(Int32)

Moves the focus back by a specified number of records in the data source.

print(PrintMedium)

Prints the current record.

prompt()

Activates the standard form, SysQueryForm, that is used to limit a query range.

query()
query(Query)
queryBuildDataSource()
queryRun()
queryRun(QueryRun)
queryRunQueryBuildDataSource()
recordsMarked()
refresh()

Updates the form by updating the view of all the records in the data source.

refreshEx()

Updates the view of the specified records.

refreshEx(Object)
registerOverrideMethod(String, String, XppObjectBase)
registerOverrideMethod(String, String)
removeFieldFromSelectionList(Int32)
removeFilter()

Resets the query for the data source.

removeNotifyHandler(FormObjectSetNotify) (Inherited from FormObjectSet)
reread()

Rereads the current record from the database.

rereadJoinHierarchy()
rereadReferenceDataSources()
research()

Is overridden by the FormDataSource.research method.

research(Boolean)
resolvePartLinks(String, Int32)
selectionChanged()
setCurrent()
setNames(String, String)
setPagingParameters(Boolean, Int32, Int32)
setPosition(Int32) (Inherited from FormObjectSet)
setRecord(Common)
setTimeOut(String, Int32, Boolean)
Obsolete.
(Inherited from XppObjectBase)
setTimeOut(String, Int32)
Obsolete.
(Inherited from XppObjectBase)
startPosition()
startPosition(Int32)
startRowIndex()
table()

Gets or sets the table ID associated with the object.

table(Int32)
titleFields(Common)
totalNumberOfRows()
usageCount() (Inherited from XppObjectBase)
validateDelete()

Requests that the user confirm the deletion of a record from the data source.

validateWrite()

Determines whether data is valid and ready to be written.

validTimeStateAutoQuery()
validTimeStateAutoQuery(Int32)
validTimeStateUpdate()
validTimeStateUpdate(Int32)
VerifyKernelClass() (Inherited from XppObjectBase)
wait() (Inherited from XppObjectBase)
write()

Calls the FormDataSource.validateWrite method and manages the database write operation.

writing()
written()
Xml() (Inherited from XppObjectBase)
Xml(Int32) (Inherited from XppObjectBase)

Events

OnActivated
OnCreated
OnCreating
OnDeleted
OnDeleting
OnDisplayOptionInitialize
OnInitialized
OnInitValue
OnLeavingRecord
OnLeftRecord
OnMarkChanged
OnPostLinkActive
OnQueryExecuted
OnQueryExecuting
OnRefreshed
OnReread
OnSelectionChanged
OnValidatedDelete
OnValidatedWrite
OnValidatingDelete
OnValidatingWrite
OnWriting
OnWritten

Explicit Interface Implementations

IHasImplementationClass._impl() (Inherited from FormObjectSet)

Applies to