Skip to main content

Posts

How to refresh lightning web component.

How to refresh lightning web component?. Use below method to refresh to lightning web component. - refreshApex function call apex method and re load latest data in track variable. - now your LWC have the latest data. refreshApex(this.yourTrackVariable);

How to apply filters on lightning datatable

lightning:datatable <div style="height: 300px">         <lightning:datatable                 keyField="id"                 data="{! v.data }"                 columns="{! v.columns }"                 hideCheckboxColumn="true"/>     </div> directly we can not apply filters on lightning data table,  - create filters form - submit filters data in where query - get result data  - submit result data to lightning:datatable

What are the basic rules to write a trigger

A pice of apex logic is executed based on DML operations like,  Before Insert  After Insert Before Update  After Update Before Delete After Delete Before Undelete After Undelete use trigger.new for latest data as list of sObjects trigger.old for previous data as list of sObjects trigger.newMap for latest data as map of Id and data trigger.oldMap for old data as map of id and data