Notes
HTML
<template>
<lightning-record-picker
label="Accounts"
placeholder="Search Accounts..."
object-api-name="Account"
onchange={getId}
>
</lightning-record-picker>
<div>Selected Account ID: <b>{acId}</b></div>
</template>
JavaScript
import { LightningElement, track } from 'lwc';
export default class Picker extends LightningElement {
@track acId;
getId(event){
this.acId = event.detail.recordId;
}
}
Preview