Get Hands on with Conditional Directives and Refs || Salesforce Trailhead

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ส.ค. 2023
  • #javascriptdeveloper1certificationmaintenancesummer23
    #gethandsonwithconditionaldirectivesandrefs
    #summer23releasesalesforce
    Join this channel to get access to perks:
    / @salesforceagent
    #salesforceagent

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

  • @salesforceagent
    @salesforceagent  9 หลายเดือนก่อน

    code :
    parent.js
    import { LightningElement, api, wire } from "lwc";
    import { getRecord, getFieldValue } from "lightning/uiRecordApi";
    import FIELD_NAME from "@salesforce/schema/Account.Name";
    import FIELD_OWNER_NAME from "@salesforce/schema/Account.Owner.Name";
    import FIELD_PHONE from "@salesforce/schema/Account.Phone";
    import FIELD_INDUSTRY from "@salesforce/schema/Account.Industry";
    export default class Parent extends LightningElement {
    @api recordId;
    @wire(getRecord, { recordId: "$recordId", fields: [FIELD_NAME, FIELD_INDUSTRY], optionalFields: [FIELD_PHONE, FIELD_OWNER_NAME] })
    account;
    get name() {
    return getFieldValue(this.account.data, FIELD_NAME);
    }
    get phone() {
    return getFieldValue(this.account.data, FIELD_PHONE);
    }
    get industry() {
    return getFieldValue(this.account.data, FIELD_INDUSTRY);
    }
    get owner() {
    return getFieldValue(this.account.data, FIELD_OWNER_NAME);
    }
    sayHi() {
    let cmp = this.refs.child; //this.template.querySelector("c-child");
    cmp.sayHi();
    }
    }
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>
    parent.html




    Account Name: {name}
    Industry: {industry}
    Phone: {phone}
    Owner: {owner}



    An error occurred while retrieving data

  • @sunilgaikwad8773
    @sunilgaikwad8773 8 หลายเดือนก่อน +1

    you are best bro

  • @user-bh4bi1mx4z
    @user-bh4bi1mx4z 4 วันที่ผ่านมา +1

    The video goes fizzy at 1:47mins

    • @salesforceagent
      @salesforceagent  4 วันที่ผ่านมา

      That’s a basic, anyone can create new playground for setting up new password and then connect username by login.

  • @mohdsarfraz8677
    @mohdsarfraz8677 7 หลายเดือนก่อน +2

    I'm getting this error while I have added Record Target in both XMLs.
    We can’t find the Record Page target in the parent component’s metadata file. Please complete the prework.
    Please help me

    • @IravanaGorky
      @IravanaGorky 7 หลายเดือนก่อน +1

      are you able to fix this?

    • @parthasarathinayak2507
      @parthasarathinayak2507 5 หลายเดือนก่อน +1

      Hi @mohdsarfraz. i am also facing same error message We can’t find the Record Page target in the parent component’s metadata file. Please complete the prework. do you have any solution for that , Please help me.
      thank you

    • @salesforceagent
      @salesforceagent  5 หลายเดือนก่อน +1

      I’ll suggest you guys to create new playground and start with same steps will solve your problem for sure .

    • @manikumar1662
      @manikumar1662 4 หลายเดือนก่อน +1

      @@salesforceagent I have created new playground still I am getting the same issue
      can you pleas help me

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

      @@manikumar1662 share me screenshots on Instagram, i'll check . Thanks.

  • @user-ti4ek3zd7e
    @user-ti4ek3zd7e 2 หลายเดือนก่อน +1

    i dont have parent under "custom" for the burlington account

    • @salesforceagent
      @salesforceagent  2 หลายเดือนก่อน

      Did you created new playground before starting this module ??

    • @omkarkadam2348
      @omkarkadam2348 2 หลายเดือนก่อน

      Yes, I did. But yet it is not showing​@@salesforceagent

  • @DG-gq4ps
    @DG-gq4ps 8 หลายเดือนก่อน +1

    I know you blurred some of your content to protect your private information. I'm lost after creating an org.

    • @salesforceagent
      @salesforceagent  8 หลายเดือนก่อน

      What’s the issue you facing ?

    • @DG-gq4ps
      @DG-gq4ps 8 หลายเดือนก่อน

      @@salesforceagentnot sure how to get to @3:28

  • @mannbhangu6928
    @mannbhangu6928 4 หลายเดือนก่อน +1

    whats the point of this video everything is blurred

    • @salesforceagent
      @salesforceagent  4 หลายเดือนก่อน +1

      That’s a basic, anyone can create new playground for setting up new password and then connect username by login.