function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
hi all
i wanna get current customerportal id
how its possible
help me plz
thanks in advance
This is not exposed in either apex or visualforce today. What's your use case and are you using a force.com site with this portal?
You can get the current customer portal user id by this code:
UserInfo.getUserId();
Below is the sample code to check whether any customer portal user is logged In or not.
User usr = [Select ContactId, Profile.Name from user where Id=: UserInfo.getUserId()];
if(usr.ContactId !=null)
{
LoggedIn = true;
//Customer portal user is logged in.
}
Hope this helps.
This is not exposed in either apex or visualforce today. What's your use case and are you using a force.com site with this portal?
You can get the current customer portal user id by this code:
UserInfo.getUserId();
Below is the sample code to check whether any customer portal user is logged In or not.
User usr = [Select ContactId, Profile.Name from user where Id=: UserInfo.getUserId()];
if(usr.ContactId !=null)
{
LoggedIn = true;
//Customer portal user is logged in.
}
Hope this helps.