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
Vinay ChanchlaniVinay Chanchlani 

How To Determine the Expiration of installed packages programmatically ?

I was looking for the way to programmatically determine the expiration date of package licenses via PackageLicense Table, I've tried this with following ways :

1.) Via Status Column of PackageLicense  Table, but it seems that the status column in this table do not changes to Expired even after the package has expired on the org.

2.) Via ExpirationDate column, not able to understand how this expiration date is exactly used in salesforce implementation because I checked this with both user timezone and org's timezone but sometime it gets expired according to user's timezone but sometime its not exactly behaving in that way.

I've also crossed check this with GMT but seems like it do not depends on timezone.

Problem is Expiration date-time has crossed but package is still accessible to me and gets expired after some undetermined time.

Please let me know how can I exactly determine programmatically whether my package has expired or not.
Vla ChaVla Cha

please check here: