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

How to identify the user login with community or salesforce Internal app

Hi All ,
In my organisation partner community is enabled ,So one profile which is the Sales Area Manager ,bacically he is a salesforce user .We have made that user as partner account owner .
When He/She loged in as asfdc user .He can use the global header to swip in to community as in community his profile is added .
Issue is I need to identify where actually he loged in whethere he is in community or Salesforce .How can I identify in apex .

You said you need to identify in Apex how they are logged in... Can you explain this part in more detail?

- If you are showing a visualforce page and need to know, then use javascript to inspect the global header picker.... jquery will help to search for certain text visible in the drop-down.
- If it's more back-end like in a trigger, I can't think of a way to do that. I can only solve it if you are running a VF page.