You need to sign in to do that
Don't have an account?
anvesh@force.com
how to display the current user name in textbox ?
i have a feild named owner of type textbox and have lookup relation....
now the thing is when i clicked new button (to create) all fields are displayed including owner field but this feild default should displayed as current user name in the text box...how we can do this any one pls?.
Anvesh - If you are using an inputField component on your VF page you can instantiate the object in the constructor as
Object__c obj = new Object__c(Owner = UserInfo.Id) or obj.Owner = UserInfo.Id. This should default the owner to current user and show the users name in the page.
yes but i am creating for case object that means standard obj....how we ll get VF page for case object
let me clear you my task first.....
for case object there is a requirement to create a feild 'Owner' (this is custom feild) (Other Than Case Owner) , and that Owner field has a look up and when we click that look up all sfdc users should need to be display. by default in that owner feild textbox current user name should need to be displayed.
@Anvesh I have the same issue, I was searching and got it here, I know it is very old post but wanted to know how did you solve this issue,As I am new to salesforce administrator
You can reach me at priya@ezanchorpuller.com
Any help will be appreciated