1

If my apex class API version is 28, will there be any issue if i try to use List class contains method ?

I checked in debug logs, even if class has api version 28, i am able to use List contains method. Does api version anywhere else in my org override class api version making class api version meaningless ?

1
  • 2
    If you are stuck with api 28, you can make yourself a little utility class with API level 42 that can perform the contains() method for you. May 24, 2018 at 1:09

1 Answer 1

3

Contains method was introduced recently; I guess in version 42.0.

To use the it, you would have to upgrade API version of the class.

Note: Salesforce recommends to upgrade the API version after every 3 releases. But make sure to check if anything breaks after the upgrade.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .