FormDataSource Class

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

Syntax

class FormDataSource extends FormObjectSet

Run On

Client

Methods

  Method Description
Gg892246.pubmethod(en-us,AX.60).gif 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. (Overrides the active Method.)
Gg892246.pubmethod(en-us,AX.60).gif addFieldToSelectionList
Gg892246.pubmethod(en-us,AX.60).gif addNotifyHandler (Inherited from FormObjectSet.)
Gg892246.pubmethod(en-us,AX.60).gif addReferenceFieldToSelectionList
Gg892246.pubmethod(en-us,AX.60).gif allowCheck
Gg892246.pubmethod(en-us,AX.60).gif allowCreate
Gg892246.pubmethod(en-us,AX.60).gif allowDeferredLoad
Gg892246.pubmethod(en-us,AX.60).gif allowDelete
Gg892246.pubmethod(en-us,AX.60).gif allowEdit Determines whether the user can change the contents of the control.
Gg892246.pubmethod(en-us,AX.60).gif allRowsLoaded
Gg892246.pubmethod(en-us,AX.60).gif anyMarked Checks whether any records in the underlying cache are marked.
Gg892246.pubmethod(en-us,AX.60).gif autoNotify
Gg892246.pubmethod(en-us,AX.60).gif autoQuery
Gg892246.pubmethod(en-us,AX.60).gif autoSearch
Gg892246.pubmethod(en-us,AX.60).gif cacheAddMethod Registers the specified display or edit method for caching.
Gg892246.pubmethod(en-us,AX.60).gif cacheCalculateMethod Calls the specified cached method and updates the value in the cache for the current record.
Gg892246.pubmethod(en-us,AX.60).gif cacheOnlyMode
Gg892246.pubmethod(en-us,AX.60).gif cacheRemoveRecord Removes the specified record from the underlying cache of the data source.
Gg892246.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg892246.pubmethod(en-us,AX.60).gif canCreate
Gg892246.pubmethod(en-us,AX.60).gif canDelete
Gg892246.pubmethod(en-us,AX.60).gif canEdit
Gg892246.pubmethod(en-us,AX.60).gif clearDisplayOption Clears display options that were previously specified for a record and then redraws the record.
Gg892246.pubmethod(en-us,AX.60).gif clearReferenceData
Gg892246.pubmethod(en-us,AX.60).gif company
Gg892246.pubmethod(en-us,AX.60).gif counterField
Gg892246.pubmethod(en-us,AX.60).gif create Creates a new record in the data source. (Overrides the create Method.)
Gg892246.pubmethod(en-us,AX.60).gif createTypes
Gg892246.pubmethod(en-us,AX.60).gif crossCompanyAutoQuery
Gg892246.pubmethod(en-us,AX.60).gif cursor Has no functionality in the FormObjectSet class. (Overrides the cursor Method.)
Gg892246.pubmethod(en-us,AX.60).gif cursorNotify Notifies the application about a cursor event.
Gg892246.pubmethod(en-us,AX.60).gif 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.
Gg892246.pubmethod(en-us,AX.60).gif delayActive
Gg892246.pubmethod(en-us,AX.60).gif delete Deletes the current record from the data source. (Overrides the delete Method.)
Gg892246.pubmethod(en-us,AX.60).gif deleted
Gg892246.pubmethod(en-us,AX.60).gif deleteMarked Deletes all marked (selected) records from a data source. (Overrides the deleteMarked Method.)
Gg892246.pubmethod(en-us,AX.60).gif deleting
Gg892246.pubmethod(en-us,AX.60).gif displayOption Sets the text color and the background color for a record in the data source.
Gg892246.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg892246.pubmethod(en-us,AX.60).gif executeQuery Executes the data source query and displays the records that are retrieved.
Gg892246.pubmethod(en-us,AX.60).gif extends
Gg892246.pubmethod(en-us,AX.60).gif filter Filters records in the data source.
Gg892246.pubmethod(en-us,AX.60).gif findRecord Finds the specified record in the data source and makes it the current record. (Overrides the findRecord Method.)
Gg892246.pubmethod(en-us,AX.60).gif findValue 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.
Gg892246.pubmethod(en-us,AX.60).gif first Moves focus to the first record in the data source. (Overrides the first Method.)
Gg892246.pubmethod(en-us,AX.60).gif forceWrite
Gg892246.pubmethod(en-us,AX.60).gif formRun (Inherited from FormObjectSet.)
Gg892246.pubmethod(en-us,AX.60).gif functionObject
Gg892246.pubmethod(en-us,AX.60).gif getDataRow
Gg892246.pubmethod(en-us,AX.60).gif getFirst Retrieves the first record in a data set.
Gg892246.pubmethod(en-us,AX.60).gif getNext Returns the next record that meets the criteria that are set up in an earlier call to the FormDataSource.getFirst method.
Gg892246.pubmethod(en-us,AX.60).gif getPosition (Inherited from FormObjectSet.)
Gg892246.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg892246.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg892246.pubmethod(en-us,AX.60).gif id Retrieves the ID of the data source. (Overrides the id Method.)
Gg892246.pubmethod(en-us,AX.60).gif index
Gg892246.pubmethod(en-us,AX.60).gif init Creates a data source query that is based on the data source properties. (Overrides the init Method.)
Gg892246.pubmethod(en-us,AX.60).gif initValue Initializes field values in a new record. (Overrides the initValue Method.)
Gg892246.pubmethod(en-us,AX.60).gif insertAtEnd
Gg892246.pubmethod(en-us,AX.60).gif insertIfEmpty
Gg892246.pubmethod(en-us,AX.60).gif isBaseDataSource
Gg892246.pubmethod(en-us,AX.60).gif isInheritanceDataSource
Gg892246.privmethod(en-us,AX.60).gif isOptionalRecordCreated
Gg892246.pubmethod(en-us,AX.60).gif isReferenceDataSource
Gg892246.pubmethod(en-us,AX.60).gif joinRelation
Gg892246.pubmethod(en-us,AX.60).gif joinRelationAsDictRelation
Gg892246.pubmethod(en-us,AX.60).gif joinSource
Gg892246.pubmethod(en-us,AX.60).gif joinSourceDataSource
Gg892246.pubmethod(en-us,AX.60).gif last Moves the mouse pointer to the last record in the data source. (Overrides the last Method.)
Gg892246.pubmethod(en-us,AX.60).gif leave Provides notification when the mouse pointer is moved to the next record or to another data source.
Gg892246.pubmethod(en-us,AX.60).gif leaveRecord Provides notification when the focus moves to another record or item in the form. (Overrides the leaveRecord Method.)
Gg892246.pubmethod(en-us,AX.60).gif linkActive Calls the FormDataSource.exeuteQuery method on data sources that are linked to the current data source.
Gg892246.pubmethod(en-us,AX.60).gif linkType
Gg892246.pubmethod(en-us,AX.60).gif mark
Gg892246.pubmethod(en-us,AX.60).gif markAllLoadedRecords
Gg892246.pubmethod(en-us,AX.60).gif markChanged
Gg892246.pubmethod(en-us,AX.60).gif markRecord Marks the specified record by using the specified mark value.
Gg892246.pubmethod(en-us,AX.60).gif markRecords
Gg892246.pubmethod(en-us,AX.60).gif masterInheritanceDataSource
Gg892246.pubmethod(en-us,AX.60).gif masterObjectSet Retrieves the master object set for the current object set. (Inherited from FormObjectSet.)
Gg892246.pubmethod(en-us,AX.60).gif maxAccessRight
Gg892246.pubmethod(en-us,AX.60).gif maxPagingRowCountValue
Gg892246.pubmethod(en-us,AX.60).gif name Gets or sets the name that is used in code to identify a form, report, table, query, or other Microsoft Dynamics AX application object. (Overrides the name Method.)
Gg892246.pubmethod(en-us,AX.60).gif new Initializes a new instance of the Object class. (Inherited from Object.)
Gg892246.pubmethod(en-us,AX.60).gif next Moves the focus to the next record in the data source. (Overrides the next Method.)
Gg892246.pubmethod(en-us,AX.60).gif nextPage Moves a specified number of records forward in the data source. (Overrides the nextPage Method.)
Gg892246.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Gg892246.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Gg892246.pubmethod(en-us,AX.60).gif numberOfRowsLoaded
Gg892246.pubmethod(en-us,AX.60).gif object Returns an instance of the FormDataObject class that has the specified ID. (Overrides the object Method.)
Gg892246.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg892246.pubmethod(en-us,AX.60).gif onlyFetchActive
Gg892246.pubmethod(en-us,AX.60).gif optionalRecordMode
Gg892246.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg892246.pubmethod(en-us,AX.60).gif pageSize
Gg892246.pubmethod(en-us,AX.60).gif pagingEnabled
Gg892246.pubmethod(en-us,AX.60).gif parentTitleFields
Gg892246.pubmethod(en-us,AX.60).gif prev Moves the focus to the previous record in the data source. (Overrides the prev Method.)
Gg892246.pubmethod(en-us,AX.60).gif prevPage Moves the focus back by a specified number of records in the data source. (Overrides the prevPage Method.)
Gg892246.pubmethod(en-us,AX.60).gif print Prints the current record.
Gg892246.pubmethod(en-us,AX.60).gif prompt Activates the standard form, SysQueryForm, that is used to limit a query range. (Overrides the prompt Method.)
Gg892246.pubmethod(en-us,AX.60).gif query
Gg892246.pubmethod(en-us,AX.60).gif queryBuildDataSource
Gg892246.pubmethod(en-us,AX.60).gif queryRun
Gg892246.pubmethod(en-us,AX.60).gif queryRunQueryBuildDataSource
Gg892246.pubmethod(en-us,AX.60).gif recordsMarked
Gg892246.pubmethod(en-us,AX.60).gif refresh Updates the form by updating the view of all the records in the data source. (Overrides the refresh Method.)
Gg892246.pubmethod(en-us,AX.60).gif refreshEx Updates the view of the specified records. (Overrides the refreshEx Method.)
Gg892246.pubmethod(en-us,AX.60).gif removeFieldFromSelectionList
Gg892246.pubmethod(en-us,AX.60).gif removeFilter Resets the query for the data source. (Overrides the removeFilter Method.)
Gg892246.pubmethod(en-us,AX.60).gif removeNotifyHandler (Inherited from FormObjectSet.)
Gg892246.pubmethod(en-us,AX.60).gif reread Rereads the current record from the database. (Overrides the reread Method.)
Gg892246.pubmethod(en-us,AX.60).gif rereadReferenceDataSources
Gg892246.pubmethod(en-us,AX.60).gif research Is overridden by the FormDataSource.research method. (Overrides the research Method.)
Gg892246.pubmethod(en-us,AX.60).gif selectionChanged
Gg892246.pubmethod(en-us,AX.60).gif setCurrent
Gg892246.pubmethod(en-us,AX.60).gif setPagingParameters
Gg892246.pubmethod(en-us,AX.60).gif setPosition (Inherited from FormObjectSet.)
Gg892246.pubmethod(en-us,AX.60).gif setRecord
Gg892246.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg892246.pubmethod(en-us,AX.60).gif startPosition
Gg892246.pubmethod(en-us,AX.60).gif startRowIndex
Gg892246.pubmethod(en-us,AX.60).gif table Gets or sets the table ID associated with the object.
Gg892246.pubmethod(en-us,AX.60).gif titleFields
Gg892246.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg892246.pubmethod(en-us,AX.60).gif totalNumberOfRows
Gg892246.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Gg892246.pubmethod(en-us,AX.60).gif validateDelete Requests that the user confirm the deletion of a record from the data source. (Overrides the validateDelete Method.)
Gg892246.pubmethod(en-us,AX.60).gif validateWrite Determines whether data is valid and ready to be written. (Overrides the validateWrite Method.)
Gg892246.pubmethod(en-us,AX.60).gif validTimeStateAutoQuery
Gg892246.pubmethod(en-us,AX.60).gif validTimeStateUpdate
Gg892246.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg892246.pubmethod(en-us,AX.60).gif write Calls the FormDataSource.validateWrite method and manages the database write operation. (Overrides the write Method.)
Gg892246.pubmethod(en-us,AX.60).gif writing
Gg892246.pubmethod(en-us,AX.60).gif written
Gg892246.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)

Top

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.

Examples

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); 
}

Inheritance Hierarchy

Object Class
  FormObjectSet Class
    FormDataSource Class

See Also

FormObjectSet Class

FormDataObject Class