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
sindhugsindhug 

How can we get three part version number (major.minor.patch)of a managed package?

we have a managed package installed in our org.we want to get complete version of the package .we used version class
String version_nbr;
if(System.requestVersion().compareTo(new Version(1,0,0)) >= 0) {
String major=String.Valueof(System.requestVersion().major());
String minor=String.Valueof(System.requestVersion().minor());
String patch=String.Valueof(System.requestVersion().Patch());
if(patch==null)
version_nbr=major+'.'+minor;
system.debug(version_nbr);
else
version_nbr=major+'.'+minor+'.'+patch;
system.debug(version_nbr);
}
When i use this it is returning patch as null even the package version is 2.13.4
NagendraNagendra (Salesforce Developers) 
sindhugsindhug
Thanku Nagendra .
I am going in the same way as i gave in the code but it returns 2.13 only.Any reasons behind this?