General X++ Development
How do I find a record by RecId in X++?
How do I find a record by RecId in X++?
1 answer
Write an answerYou can select by RecId directly.
MyTable myTable;
select firstOnly myTable
where myTable.RecId == _recId;If the table already has a standard findRecId() or similar find method, I normally use that instead. It keeps the lookup logic in one place.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer