How to display the Contacts based on AccountId in Salesforce Lightning Webcomponent

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ต.ค. 2024

ความคิดเห็น • 22

  • @abhishekshukla1339
    @abhishekshukla1339 4 หลายเดือนก่อน

    Good Work keep it up

  • @Mr.Panindiastar
    @Mr.Panindiastar 2 ปีที่แล้ว +1

    if i want to use this code in custom objects, how to convert 'account id' ? i think teacher__c? or teacher___r ?

  • @mahiahmed5337
    @mahiahmed5337 3 ปีที่แล้ว +1

    it is possible to display related contacts on a accounts detail page

    • @sfdcscenarios
      @sfdcscenarios  3 ปีที่แล้ว +1

      yes

    • @mahiahmed5337
      @mahiahmed5337 3 ปีที่แล้ว

      @@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

    • @sfdcscenarios
      @sfdcscenarios  3 ปีที่แล้ว

      @@mahiahmed5337 its possible

    • @mahiahmed5337
      @mahiahmed5337 3 ปีที่แล้ว

      @@sfdcscenarios how...

    • @sfdcscenarios
      @sfdcscenarios  3 ปีที่แล้ว

      @@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)

  • @sandippaswan509
    @sandippaswan509 ปีที่แล้ว

    Whay we use doller

    • @sfdcscenarios
      @sfdcscenarios  ปีที่แล้ว

      That's the standard syntax we have in Salesforce.

  • @kiitana3842
    @kiitana3842 3 ปีที่แล้ว

    error message Unable to find Apex action method referenced

    • @sfdcscenarios
      @sfdcscenarios  3 ปีที่แล้ว

      Please check the Apex class method. It might not have deployed to the source org.

    • @kiitana3842
      @kiitana3842 3 ปีที่แล้ว

      @@sfdcscenarios it's says only aggregate expressions use field aliasing

    • @sfdcscenarios
      @sfdcscenarios  3 ปีที่แล้ว +1

      @@kiitana3842 Please share your code here

    • @kiitana3842
      @kiitana3842 3 ปีที่แล้ว

      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);
      }
      }

    • @kiitana3842
      @kiitana3842 3 ปีที่แล้ว

      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;
      }
      }