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
sfdevelop011.3903242333401877E12sfdevelop011.3903242333401877E12 

how to insert a checkbox in vf page using standard controller USer


both Of u thank you verymuch....
One more doubt is >>> 
 how to insert a checkbox in vf page.
for example::
am creating a VF page on controller called User
 in User there are lot of Checkboxes are there
in that i want to insert anyof them into VF page
like:Knowledge User
      Allow Forecasting
     Call Center
     Offline User
these above are the check boxes i want insert all these in User VF page
Best Answer chosen by sfdevelop011.3903242333401877E12
Himanshu ParasharHimanshu Parashar
you can get fields api names from here.
 
https://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_user.htm


Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
 

All Answers

Himanshu ParasharHimanshu Parashar
You can use following code to do that.
 
<apex:inputCheckbox value="{!user.ForecastEnabled}"/><br/>
<apex:inputCheckbox value="{!user.UserPermissionsOfflineUser}"/>

and if you want to disable the field for click add disabled attribute as true
 
<apex:inputCheckbox value="{!user.ForecastEnabled}" disabled="true"/><br/>
<apex:inputCheckbox value="{!user.UserPermissionsOfflineUser}" disabled="true"/>

Please close following thread as well

https://developer.salesforce.com/forums/?id=906F0000000B0cuIAC

Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
sfdevelop011.3903242333401877E12sfdevelop011.3903242333401877E12
thank u soo much... how would i know the field name like... forecastenabled n userpermissionsofflineuser? instead of this things i used OfflineUser n AllowForecasting. ex:<apex:inputCheckbox value="{!user.OfflineUser}" disabled="true"/><br/>
 
Himanshu ParasharHimanshu Parashar
you can get fields api names from here.
 
https://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_user.htm


Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
 
This was selected as the best answer
sfdevelop011.3903242333401877E12sfdevelop011.3903242333401877E12
thank you parashar ji