function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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
Thnaks.
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.