@@sfdcscenarios okk but there is one more thing I want to del a record with toast msg but before deleting the record i need a confirmation msg after clicking ok then i want del
@@mahiahmed5337 Once the button is clicked display the popup up with yes or no. Once the user clicks on yes implement your logic(execute the server-side logic and then fire the toasted message)
Good Work keep it up
if i want to use this code in custom objects, how to convert 'account id' ? i think teacher__c? or teacher___r ?
it is possible to display related contacts on a accounts detail page
yes
@@sfdcscenarios okk but there is one more thing
I want to del a record with toast msg but before deleting the record i need a confirmation msg after clicking ok then i want del
@@mahiahmed5337 its possible
@@sfdcscenarios how...
@@mahiahmed5337 Once the button is clicked display the popup up with yes or no. Once the user clicks on yes implement your logic(execute the server-side logic and then fire the toasted message)
Whay we use doller
That's the standard syntax we have in Salesforce.
error message Unable to find Apex action method referenced
Please check the Apex class method. It might not have deployed to the source org.
@@sfdcscenarios it's says only aggregate expressions use field aliasing
@@kiitana3842 Please share your code here
import { LightningElement,track,wire } from 'lwc';
import displayguestinfo from '@salesforce/apex/guesthotelrecords.displayguestinfo';
export default class Guestinformation extends LightningElement{
@track guesthotelrecords;
@wire(displayguestinfo) Guest_Master__c;
Guest_Master__cId;
handleClick(event){
this.Guest_Master__cId=event.target.value;
const sampledemoevent=new CustomEvent('samplevent',
{
detail:this.Guest_Master__cId
});
this.dispatchEvent(sampledemoevent);
}
}
import {LightningElement,track,wire} from 'lwc';
import displayhotelinfo from '@salesforce/apex/guesthotelrecords.displayhotelinfo';
export default class Hotelinformation extends LightningElement {
@track Guest_Master__cId;
@track displayhotelinfo;
@track records;
@track error;
@wire(displayhotelinfo,{gmId:'$Guest_Master__cId'})
information({error,data}){
if(data){
this.records=data;
this.error=undefined;
}
else
{
this.records=undefines;
this.error=error;
}
}
handlechange(event){
this.Guest_Master__cId=event.detail;
}
}