Skip to content

Instantly share code, notes, and snippets.

@tommykakashi
Created March 7, 2013 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommykakashi/5106563 to your computer and use it in GitHub Desktop.
Save tommykakashi/5106563 to your computer and use it in GitHub Desktop.
Find() method in X++
static HMEmployee find(HMEmployeeId employeeId,
boolean _forUpdate = false)
{
HMEmployee employeeTable;
if (employeeId)
{
if (_forUpdate)
{
employeeTable.selectForUpdate (_forUpdate);
}
employeeTable.selectLocked (_forUpdate);
select firstonly employeeTable
where employeeTable.EmployeeId == employeeId;
}
return employeeTable;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment