Find your content:

Search form

You are here

Check managed app is installed or not

 
Share

I am integrating Salesforce with ASP.NET application using APEX code. Currently I want to know how can I fetch either the particular managed app is installed in this account or not. As I am not able to find the good documentation on integration with salesforce using apex code, as they have lots of documentation on that. Please share the link of the document integration if anyone knows about it. Thanks in advance.


Attribution to: Himanshu Jain

Possible Suggestion/Solution #1

There are a couple ways you can do this in Apex:

UserInfo.isCurrentUserLicensed(namespace) from the UserInfo class, which will allow you to determine if the package is installed and the current user has a licensed "seat". Also:

if (Type.forName('ns__KnownObjectInPackage__c') != null) {...} which is agnostic to whether the user has a license or not, but will allow you to determine if the package is installed.

If you want to lean on this logic in an off-platform environment, you could use the Metadata API to retrieve the InstalledPackage elements, or surface a REST/SOAP API in the code you do deploy.


Attribution to: bigassforce
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/30070

My Block Status

My Block Content