Find method usage in AX

Hi,
Almost all the standard tables use find method. It helps to find a record from the table based on the unique id(Primary Index) that you provide as a parameter.
Below code finds a record form the student table based on the student table provided the stuid(student id) is Unique.

Example:
static studenttable find(stuid _stuid,
boolean _forUpdate = false)
{
studenttable studenttable ;
;

if (_stuid)
{
if (_forUpdate)
studenttable .selectForUpdate(_forUpdate);

select firstonly studenttable
where studenttable .stuid == _stuid;
}
return studenttable ;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s