• Rasbehari Das
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 0
    Replies
First time I am submitting the form this is ok.
The second time I am opening a pop-up model but the fields are not resetting.
My code is like this 

 handleReset() {
        const inputFields = this.template.querySelectorAll('lightning-input-field');
        if (inputFields) {
            inputFields.forEach(field => {
                field.reset();
            });
        }
    }

But this is not working.

Please help me 
Thanks
First time I am submitting the form this is ok.
The second time I am opening a pop-up model but the fields are not resetting.
I am using this code like this.

 handleReset() {
        const inputFields = this.template.querySelectorAll('lightning-input-field');
        if (inputFields) {
            inputFields.forEach(field => {
                field.reset();
            });
        }
    }

But this is not working.

Please help me 
Thanks
import { ShowToastEvent } from 'lightning/platformShowToastEvent';

const evt = new ShowToastEvent({
  title: 'Title',                        message: 'Description should be 20 charter. \n Campaign Name Must  be 10 Character',
  variant: 'error',                      
                               
                            });
                            this.dispatchEvent(evt);
 Here I used \n it is not working.
please help me
Thanks
 
How to write custom message alternative of this message "Review the errors on this page" in salesforce validation rules.
Two date picker, Start Date and End Date.
End date should always be more than or equal to start date.
Once I select Start date is
     Ex :- 05-06-2020 
Then End Date should be 
     Ex :- 05-06-2020 OR 08-06-2020..........
In End Date picker before 05-06-2020 dates are disable.

Help me please.
Thank You 
I am importing one css file from staticresources folder, css file name is datatable.css this css file i am using for lightning-datatable in my HelloWorld component and it is working fine also css  working fine as well. But if i run first HelloWorld component then HelloWorldTest component that time same css is reflecting in HelloWorldTest component. But i am not importing css file in the HelloWorldTest component. This css is not requred in the HelloWorldTest  component.
 Now my question is how to remove css or how to clear Cache memory before calling HelloWorldTest component.

HelloWorld component.
import { LightningElement, api, wire, track } from 'lwc';
import styles from '@salesforce/resourceUrl/chartNew';
import { loadStyle } from 'lightning/platformResourceLoader';

export default class HelloWorld extends LightningElement {
renderedCallback() {
        Promise.all([
            loadStyle(this, styles + '/chart/datatable.css') 
        ]).then(() => {
            window.console.log('Files loaded.');
        }).catch(error => {
            window.console.log('Error ');
        });
    }
}

HelloWorldTest component
import { LightningElement, api, wire, track } from 'lwc';
export default class HelloWorldTest extends LightningElement {

}