I found you can get the current user id like this:

import id from '@salesforce/user/Id';

I have a really simple component where all I need are the User Id and the current Org Id. I haven't been able to find any documentation on any simple way to get the Org Id without having to go to Apex. Is this possible? It would be quite unfortunate if you really have to create an apex class and a method just to get the current org id...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.