Template refs API in Spring '23 Lightning Web Component Salesforce | LWC Stack ☁️⚡️

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024

Комментарии • 8

  • @wamconsultant
    @wamconsultant Год назад +1

    @SalesforceBolt Thanks for showing us how to use the new Template ref API!

  • @yashgupta867
    @yashgupta867 Год назад +1

    please make a video for updating the multiple records at a time.
    in lwc using updateRecord

  • @ashishmadhukar4476
    @ashishmadhukar4476 Год назад +1

    Thanks for sharing
    I have used refs api but it is not working
    error-- TypeError: Cannot read properties of undefined (reading 'mychildcmp')
    at p.handleChangeRefresh (parentRef.js:1:913)
    at callHook (aura_prod.js:47:21433)
    at aura_prod.js:13:35299
    at Yr (aura_prod.js:13:39820)
    at wr (aura_prod.js:13:35284)
    at s. (aura_prod.js:13:31496)
    at t (aura_prod.js:1:15385)
    at aura_prod.js:1:15815
    at Array.forEach ()
    at u (aura_prod.js:1:15760)
    I'M getting this error can you me please

    • @SalesforceBolt
      @SalesforceBolt  Год назад

      I think component id is missing. Just to quick check can you please try to copy and use same code from below link.
      www.salesforcebolt.com/2023/01/template-refs-api-in-spring23-salesforce-lwc.html?m=1

    • @aravindharumugam
      @aravindharumugam Год назад +1

      @Salesforce Bolt
      I'm facing the same issue even after copy pasting your whole code. Please help

    • @SalesforceBolt
      @SalesforceBolt  Год назад

      @@aravindharumugam do you have the same id in html
      and while calling it from JS?
      this.refs.childcmp.refresh();