Tell me more ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Is it possible to get information on the package through APEX after it has been installed? Specifically I want to know the Status (see below)

installed package information

The reason I want this is because I want to show instructions how to purchase if the status is 'Trial'.

share|improve this question

2 Answers

up vote 1 down vote accepted

Unfortunately there is no way of obtaining this information from Apex. You do of course know this by running a report from within your LMO, so the info does exist, just not accessible in the subcriber org.

Unfortunately any callouts you make to your production org to obtain this information will also fail once the managed package is expired. The only thought I had was to perhaps send them an email via the UninstallHandler, assuming of course they bother to uninstall the package.

This really is quite a good observation though, "how can i notify my prospective customers that the software is about to expire?". Seems like a reasonable requirement to me, something that ought to be on IdeasExchange. If have no look and feel like raising one, I'll vote for it for you!

share|improve this answer
This idea pretty much covers it success.salesforce.com/… – Kris Moyse May 15 at 1:44

Kris, I think you'll find the answer to your question in this message here on Stack Exchange.

You can use a call to UserInfo.isCurrentUserLicensed('your_package_name') to check and see if the license for it has expired.

share|improve this answer
That is different to if the license is Trial or Active. If you call UserInfo.isCurrentUserLicensed('your_package_name') and the trial license is active, you will get true. I want to know the Installed Package Status which is different. – Kris Moyse May 13 at 15:15
As I see Andrew has posted, as noted in this page of the LMA docs, using the LMO is the only way I could find to obtain info on Installed Package Status. – crmprogdev May 14 at 18:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.