Rebuilding the Standard List View in 53 Minutes | LWC Tutorial

Поділитися
Вставка
  • Опубліковано 4 жов 2024

КОМЕНТАРІ • 31

  • @JustinWills
    @JustinWills  3 роки тому +2

    I hope you enjoyed this tutorial! Please view the source code here: github.com/jawills/LWC-custom-contact-list-view

  • @agah687
    @agah687 2 роки тому +2

    Thank you. I subbed at 9:45 please make more videos like this 🙏

  • @hiteshkala5658
    @hiteshkala5658 Рік тому +1

    great presentation and technical skills.. awaiting for more :)

  • @rayapputih
    @rayapputih 10 місяців тому +1

    it is pretty clear and good presentation, thanks

  • @ikec7941
    @ikec7941 Рік тому

    Excellent underrated Video ! keep it up 👍 looking forwards to see more!

  • @willcalltickets
    @willcalltickets 2 роки тому +2

    Thank you for this video.
    Couple of questions...
    1) When I create a new contact, I am then redirected to the contact details. Is there a way to redirect back to the Custom Contact List View? I realize I can just navigate there by clicking on the tab.
    2) Is there a way we can refresh the list after creating a new contact without having to refresh the contact-list-view page? Is there someway to attach a method to do the refresh after the contact creation?

    • @JustinWills
      @JustinWills  2 роки тому +1

      Rob,
      Glad you enjoyed the video!
      This is absolutely possible.
      1) You need to use the state object with the property, 'nooverride' and set the value to '1' (String). Here's an example on SO. I will also show a pastebin of production code I used for another project to show how its written.
      2) You can do this using 'refreshApex'. This is how you update the cached records from the @wire service. See the documentation below for more info.
      salesforce.stackexchange.com/questions/251358/navigate-to-overriden-standard-new-page-with-lwc-navigationmixin
      developer.salesforce.com/docs/component-library/documentation/en/lwc/apex_result_caching
      pastebin.com/DzZjSBSD
      I hope this helps!

  • @rosellegegajo
    @rosellegegajo 2 роки тому +1

    Thanks a lot

  • @aditichavan9197
    @aditichavan9197 3 місяці тому

    Nicely explained on the wired method to datatable. I am stuck to display the DOB which is of Date format, I tried to use "text" and "date" in the type attribute of column
    { label: 'Date of Birth', fieldName: 'DOB', type: 'text' },
    not showing on the screen. Can you please help
    Thanks in advance

    • @JustinWills
      @JustinWills  3 місяці тому

      It seems like your field name is incorrect. If you are using the standard field on the contact, the field Name is `Birthdate`, and if you are using a custom field, ensure you are using the API field name from setup

  • @oulkabirabderrahman2610
    @oulkabirabderrahman2610 2 роки тому +1

    Hello,
    Thank you for you video
    Do you have any example how we can use LWC with external data ( api rest)
    And about depoly we can deploy this any where we want
    Thank you

    • @JustinWills
      @JustinWills  2 роки тому

      Hi,
      To deploy anywhere, please see the github source repo.
      I don't have any examples on hand that I can show but I would recommend using apex to handle the rest aspect and return related data. See some of my other videos if you need help with rest callouts in apex.

  • @vtn08
    @vtn08 Рік тому +1

    Can the look and feel be exactly like the standard list view?

    • @JustinWills
      @JustinWills  Рік тому

      Yes. Using this component is almost identical to the standard list view.

  • @arsalansheikh2538
    @arsalansheikh2538 Рік тому

    Hi,
    Please confirm that how can we display "no items to display" in the centre of datatable same as the standard listview, when the record count is 0?

    • @JustinWills
      @JustinWills  Рік тому

      I don't see an easy way to do this in the datatable component based on the documentation.

  • @timjones3647
    @timjones3647 3 роки тому

    this was going great and very helpful. but once i got to the Name with Link it fell appart.
    Instead of returning the values in the rows, it is returning litterallly the string ${row.Firstname} $row.{LastName}

    • @JustinWills
      @JustinWills  3 роки тому

      Timothy,
      This is using Javascript template strings. You can read more about this here:
      developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
      You need to use ` (back ticks) instead of ' (single quotes).

    • @timjones3647
      @timjones3647 3 роки тому

      @@JustinWills Thank you Sir, I am very new to this.

  • @swetadey3227
    @swetadey3227 2 роки тому

    Hi Justin, I am trying to the same functionality with the Product object, after searching the product from the search bar I am not able to see the ProductName in the column of data table, while the other columns like product code, description are visible. Can you tell me why is this happening?

    • @JustinWills
      @JustinWills  2 роки тому +1

      Sweta,
      It's hard to say without seeing a code snippet. Can you confirm that you are using the correct api name? If you link a pastebin I can better assist you.

  • @Iyravlogs
    @Iyravlogs Рік тому

    Hi can u please let me know , how you are defining the number of records displayed per page, if we need to see more records is there any option to go to next page or how it happens

    • @JustinWills
      @JustinWills  Рік тому +1

      The number of records is defined in the limit of the SOQL query. There is no pagination in this tutorial.

    • @Iyravlogs
      @Iyravlogs Рік тому

      Sir, I am using your logic in Community portal, the name field and account are hyperlink which takes to the record detail page, but in community portal it is not working, when we click on name or account its taking to error page in community. Can you please tell me if anything needs to be changed for portal

  • @anandpaul9067
    @anandpaul9067 Рік тому

    how to add viewall button beneath Datatable LWC component

    • @JustinWills
      @JustinWills  Рік тому

      Hi, not sure what you mean by viewall

    • @anandpaul9067
      @anandpaul9067 Рік тому

      like data table has 25 records of data table and I want to show just 5 records in default and we get to see all the records when clicking on view all button

    • @JustinWills
      @JustinWills  Рік тому

      @@anandpaul9067 If you have all the records as a list view, you can use NavigationMixin to push the view to the tab

  • @azurelearning960
    @azurelearning960 3 роки тому

    can we show more than 2K records?

    • @JustinWills
      @JustinWills  3 роки тому

      In theory you can but you will see massive drops in performance due to size of records as well as mappings as O(n) operations. If you want to display more records I would recommend some sort of pagination system.