Skip to main content

Set Or Get lightning-input-field in value lightning web component

  • Set the data- attribute on the lightning-input-field 

     <lightning-input-field data-field-name-id="AccountName"           field-name="AccountName__c">
     </lightning-input-field>

  • Use the this.template.querySelector() to find the correct lightning-input-field

     let field = this.template.querySelector("lightning-input-field[data-field-name-id=AccountName]"); 

  • Print the value 

     console.log(field.value);

  • Set a new value to for the lightning-input-field

     field.value="new value"; 


     Ta Da 🙌 


Comments

Popular posts from this blog

Create Static Step in Einstein Analytics Dashboard

How to create static step in Einstein Anlytics Dashboard ? You got the question right? today we will look at how to create static step in dashboard. Let's get started.. Once your on the Dashboard page click C reate Step button from the right sidebar. If your not able to see Create Step button click once inside the dashboard This will show a new pop up select  Create a Static Step with Custom Values. This will again open a new pop up for creating static step. Provide the name for the static step  & values of static steps.  Each static step value consist of the Display & the Value. The Value will be the actual column name from the dataset or the actual value you would like to provide to do sorting & filtering on the data.  The Display is the text that would be visible to the user You can see the new step being added to the dashboard. You can then use this step with Dashboard widgets like Toggle, List etc. Hope this will help...

Salesforce CPQ : Create Multiple Orders from Quote

1.     Go to Installed Packages 2.     Click on Configure next to Salesforce CPQ Package 3.    Check  Allow Multiple Orders checkbox under the Order Tab 4. Populated the Order By field on the Quote before creating Orders from Quote 5. Create Orders by clicking Ordered check box. 6. Check that multiple orders are created on the Quote.