UserDetails.html:
<
template
>
<
div
class
=
"slds-text-heading_large slds-text-align_center"
>
User Id : {currentUserId}
</
div
>
</
template
>
UserDetails.js:
import { LightningElement } from 'lwc';
import strUserId from '@salesforce/user/Id'
export default class
UserDetails extends LightningElement { userId = strUserId
}
No comments:
Post a Comment