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
modoleamodolea 

Methods from UserInfo no longer works in our sandbox

Hi,
 
Since today, in one of our sandboxes (cs2), we have a problem with triggers that use UserInfo methods.
Unfortunately Basic support does not troubleshoot triggers or development issues.
 
Code:
// line 26:
customObj__c.User__c = UserInfo.getUserId(); // error also occurs when I use: // String name = UserInfo.getName();
ErrorError: Compile Error: Method does not exist or incorrect signature: UserInfo.getUserId() at line 26 column 46

 
Please note that this code worked well before.
Have you any idea?
 
Thanks
adrian


Message Edited by modolea on 08-08-2008 12:10 AM
hisrinuhisrinu
Hi,

Just check in apex classes, may be some one created the class with name userinfo.
So now the UserInfo.getUserId() will pointing the local userinfo class.

So your class is overridding the userinfo class.

Thanks
Srini
modoleamodolea
Hi Srini,
 
Indeed, there is a class named 'UserInfo' :smileysurprised:
 
Many thanks for your reply.
 
Regards
Adrian