. QuerySelector - Returns The First Element Within The Template That Matches The Specified Selector, Or Group Of Selectors. If No Matches Are Found, Null Is Returned. So, We Have One Input Field (input1), A Lightning Button With Onclick Handler "handleClick". The QuerySelector Will Find First "lightning-input" Element. If You Are Using Lightning, You Can Do This Using Quick Actions & Related Records Components. First, You Would Need To Create A Quick Action On That Object You Are Talking About, Type = Update A Record. Per Each Set Of Fields You Want To Display, Create A New Quick Action (I Would Give Them The Same Name As Your Picklist Value) And Add Only The Fields You Want Displayed To Page Layout I Have Created A Lightning Component With Lightning Record Edit Form And A Couple Of Fields. Wrote A Javascript Method Such That When I Change The First Field To A Particular Value Then Second Field Is Updated. Below Is My Code. The Main Controller Passes The Value From The Onclick Event To The Helper And Runs Through A Switch Statement Mapping The Type To The Proper Input Field Body. Then The Helper Sets The Body Of The Dynamic Input Field Accordingly. I Declare The DynamicInputField.cmp As A Dependency When I Load The Parent Component To Avoid Trips To The Server. The Spring’20 Release Has Simplified The Lightning URL Hack Very Similar To The Classic Version. Lightning URL Hack Help You Pre-populate Field, Create Custom URL To Launch Flow, Apex Class Or Here Is How I Populate Lightning:select With Picklist Values: 1) Create A Server-side Method That Returns List Of All Picklist Values Available. 2) Call This Method When Lightning Component Is Initialized. 3) Iterate Through List Of Picklist Options Using Inside And Add Each Of Them As