Timeline for Understanding LWC without APEX?
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 15, 2021 at 19:08 | comment | added | sfdcfox♦ | @akaiprofessional thestatus will be set by the wire handler (in my example), which will be after connectedCallback finishes executing. If you don't set a default value, if:false will trigger on the value. | |
Sep 15, 2021 at 18:24 | comment | added | coinjar | thestatus isn't passing data into the field values its value just decides which code block renders | |
Sep 15, 2021 at 17:46 | comment | added | coinjar | So the connected callback runs before the record is received. In that case shouldn't the "thestatus" attribute have a value of true? I the thestatus is a boolean which you mentioned it is set in the wireHandler. Is the wireHandler the connectedCallback or do I need both. | |
Sep 15, 2021 at 16:25 | comment | added | sfdcfox♦ | @akaiprofessional Yes, the getRecord method will get the record and load it. However, this happens after connectedCallback() | |
Sep 15, 2021 at 15:56 | comment | added | coinjar | Doesn't the record load with the getRecord method? @sfdcfox | |
Sep 15, 2021 at 15:53 | comment | added | sfdcfox♦ | @TimGeorge It should be set after the record is loaded. The if:false will initially be shown until the data is loaded. | |
Sep 15, 2021 at 15:52 | comment | added | coinjar | So In this solution how is this.thestatus getting set to true or false. Currently the solution here isn't working. It is rendering the if:false block of HTML and is not changing when I change the status. | |
Sep 15, 2021 at 12:59 | comment | added | sfdcfox♦ | @TimGeorge The code in this answer does just that. It's just a matter of waiting for the data to load. | |
Sep 15, 2021 at 12:53 | comment | added | coinjar | Ok that is helpful thank you. But if I am trying to set thestatus to a boolean value based on the value of the status field (i.e. if it is 'Closed' it is false else true) would I need to create another variable to set the getfieldvalue() to? | |
Sep 15, 2021 at 12:42 | history | answered | sfdcfox♦ | CC BY-SA 4.0 |