Say the user is running an App called Sales. How do I get that information via Apex?
My use case is that I have a Visual Force redirect. It calls a method on initialization that returns a page reference. This is great except that I'd like to use the same page redirect code within multiple apps and have it send a different redirection link depending on the App.
For example I could have my code determine the name of the App (i.e. Sales) and then look for a Custom Meta Data record with the name matching the App and look for a URL field on that record to feed back as part of the page reference that is returned.
Where I am stuck is figuring out how to get the App I am in so I can then do something dynamic based on that.