You need to sign in to do that
Don't have an account?

Variable userInfo is used before it is declared
this error:
![]() | Error: Compile Error: Variable userInfo is used before it is declared. at line 62 column 42 |
on the following line
string platformUsername =
[select Platform_Username__c from User where id = :UserInfo.getUserId()].Platform_Username__c;
Do I have to declare UserInfo? If so, how?
Thanks,
Mike
No, just remove the : in front of UserInfo and you should be fine.
So, rewrite it as:
Hope this helps!
All Answers
No, just remove the : in front of UserInfo and you should be fine.
So, rewrite it as:
Hope this helps!
even when I remove : in front of UserInfo.. its giving some other error as "unexpected token: 'Userinfo'"