Share via


SysComparable.onComparableSelected Method [AX 2012]

Invoked for both of the two SysComparable interfaces when the user clicks the Compare button.

Syntax

public void onComparableSelected()

Run On

Called

Remarks

This method is intended for reading data before the compare.

Correct usage of this method can significantly improve the compare form's startup performance. The comparableList method should return a list of shallow SysComparable Interfaces; the two selected can be inflated by using this method.

Examples

This example shows how to inflate the comparable with data from the database. This should be done here (and not before) to improve performance.

public void onComparableSelected() 
{ 
    CustTable custTable; 
 
    custTable = CustTable::find(custTable.accountNum); 
}

See Also

SysComparable Interface

SysComparable.onComparableFocus Method

SysCompareContextProvider.comparableList Method