You need to sign in to do that
Don't have an account?
yogesh.rankawat
User Profile LicenseType
Hi,
I have created a controller for visual force page as follows:
In above method I am trying to fetch the license type of a user profile. But when execute this code I found this error message :
Error: Compile Error: No such column 'LicenseType' on entity 'Profile'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. at line 3 column 15
Where as this query 'Select Id, LicenseType from Profile Limit 1' return the record in sforce Explorer.
Please fix this problem.
Looking for quick response.
Thanks
Yogesh
I have created a controller for visual force page as follows:
public class ControllerLicenseTypeTest {
public Profile getProfile(){
Profile p = [Select Id, LicenseType from Profile Limit 1];
return p;
}
}
In above method I am trying to fetch the license type of a user profile. But when execute this code I found this error message :
Error: Compile Error: No such column 'LicenseType' on entity 'Profile'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. at line 3 column 15
Where as this query 'Select Id, LicenseType from Profile Limit 1' return the record in sforce Explorer.
Please fix this problem.
Looking for quick response.
Thanks
Yogesh
Check out this note:
$Profile
DESCRIPTION: A global merge field type to use when referencing information
about the current user's profile. Use profile merge fields to
reference information about the user's profile such as license
type or name.
USE: Use dot notation to access your organization's information.
Note that you cannot use the following $Profile values in
Visualforce:
• LicenseType
• UserType
Message Edited by jyoti on 06-12-2008 06:08 PM
Thanks for your quick response.
Could you please give me some sample code or example to find out LicenseType in Visual Force using $Profile.LicenseType ?