forcejs
forcejs copied to clipboard
GetUserId undefined
Hi there, I'm trying to get the user Id with the method getUserId()
, but when I type force.getUserId()
I get the following error TypeError: undefined is not an object (evaluating 'oauth.id.split')
, maybe someone has encountered this issue or has an idea of what I'm doing wrong that can help me.
Just came across this myself while updating an app I made last year that uses a TypeScript version of ForceJS.
I believe the latest version already resolves the issue you and I were having, but in case you still have an older version like me then the patch I made might help you too-best of luck.
Im having the same issue how did you fixe it ?
Hi @lumon86 - essentially I added a new 'userId' property onto the oauth object. Again, I believe the latest version already resolves the issue but you can follow the link from my last post to see specifically what code changes I made.
Perfect Thank you @scottbcovert !
this is issue should be fixed now.