I am integrating salesforce in my ASP.NET application. I am able to every operation using partnerWSDL but needs to check managed application installed in an account. Like I am having a LMA on salesforce and every user should installed that LMA before doing intigration with my application so I just need to find my LMA whether it is installed or not.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
You can use the Metadata API (just import that WSDL separately), login with the Partner WSDL, assign the endpoint/session ID to the Metadata API binding, then call listMetadata from the Metadata API. The specifics will depend on your programming language.
This is only pseudo-code written from the top of my head, roughly Java-esque in nature, so your mileage may vary. However, it's pretty trivial to use this method, because it is synchronous and doesn't require polling. This method does not rely on the presence of a specific element, which could be deleted in a future version or not present in an earlier version (if you care about versions). The namespace is guaranteed to remain constant.
As a side note, once you've got that information, you can also retrieve a package to determine the version of the package, and also all of its contents, if you desire.
I had similar situation where i had to check if package XYZ is installed in my code.
My solution was just search for specific item from that package. If that item exists it means package is installed otherwise not.
You can use this Query from SOAP API too.
Thanks It works. Please check the below code what I tried to get all the installed packages.