You need to sign in to do that
Don't have an account?
Determine Profile when Logging in as Portal User
Hi,
I would like to perform certain actions on the customer portal only when the portal user has logged in from the site login page.
In other words, when the system admins logs in as Portal user certain actions shouldn't take place.
Is there a way to differentiate if the user has logged in from the site login page or from the platform by clicking on 'Login As Portal User' button on the Contact detail page?
Thanks!
Hi,
There will be little difference in the portal/site URL and the URL generated when you login from salesforce.
You can use URL Methods to search for some string in the URL and if that string is present, do the operation else not.
//Apex Code
String currentURL=String.valueOf(System.URL.getCurrentRequestUrl());
if(currentURL.contains('searchWord')
{
//Code
}
else
{
//Code
}