+ Start a Discussion
Wim van BeekWim van Beek 

System.requestVersion().Patch() does not work

When requesting the version of a package that runs, we can use the system.requestVersion() with MinorVersion, MajorVersion and Patch

This last one does not seem to give any other results than null, even in a pach-dev and in a pusched version.

Is there any hidden trick, or is this function not working?
Any help is welcome
ShashankShashank (Salesforce Developers) 
Please note, you can only get the patch version number out of the Version object if you first pass it in through the constructor.
Wim van BeekWim van Beek
Not sure I understand what you mean with this.
These codelines are used.

System.requestVersion().major()  Works !
System.requestVersion().minor()  Works !
System.requestVersion().patch() Returns Null !!!

Woking on  apiVersion 28.0

Anything I miss here?

Michael Berry 14Michael Berry 14
Old topic, but noting it down here in case anyone else stumbles across it - System.requestVersion() at the time of writing explicitly doesn't return a patch version number. This means System.requestVersion.patch() will always return null; this appears to be by design.