Explanatory Question
Table method exists() in D365
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.
As with the find method, there should also exist an exists method. It basically works the same as the find method, except that it just returns true if a record with the unique index specified by the input parameter(s) is found. In the next example from the InventTable you can see that it returns true if the input parameter has a value AND the select statement returns a value.
static boolean exist(ItemId itemId) { return itemId && (select RecId from inventTable index hint ItemIdx where inventTable.ItemId == itemId ).RecId != 0; }
First read the answer fully, then try to explain it in your own words. After that, open a few related questions and compare the concepts. This method helps you remember the topic for a longer time and improves exam preparation.