You need to sign in to do that
Don't have an account?
Haya
How do I use =!$User
How do I use the $User field in an if statement?
Something like:
case1=[Select Priority,CaseNumber,Accountid,Subject,Contactid,CreatedDate,Ownerid from case where Ownerid=!$User];
return case1;
which of course is not how to do it.
Thanks,
Haya
The query should be like this :
In your apex controller, You have to use UserInfo methods like UserInfo.getUserId() to get the user details. For reference look at this : http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_userinfo.htm
All Answers
The query should be like this :
In your apex controller, You have to use UserInfo methods like UserInfo.getUserId() to get the user details. For reference look at this : http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_userinfo.htm
The one you are referring is Global variable for VF pages and Formulas http://www.salesforce.com/us/developer/docs/pages/Content/pages_variables_global.htm
Also keep in mind Merge fields are only for VF pages, formulas, buttons etc not for Apex
What you actually need is access through apex, Have a look at userInfo class http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_userinfo.htm
Thank you very much, Avi.
I will read the documents.
This worked.
Thank you so much, swatKat