4

Use lightning-formatted-text <select name="cars"> <template for:each={options} for:item="option"> <option value={option.value} key={option.value}> <lightning-formatted-text value="{option.label}" ></lightning-formatted-text> </option> </template> </...


3

You don't need to escape Unicode in LWC. Use the literal character in your source code: options = [ { label: 'Product®', value: 'Product®' } ];


3

The apex method requires a Contact as input parameter, but you're passing an object with these four properties that are not Contact's fields: FNAME LNAME Phone EMAIL You could either edit both JS and HTML files renaming them with the right names (FirstName, LastName, Phone and Email) or change insertContact ({ con : this.rec }) to const contact = { ...


3

["Relationship": "Subscriber", "memberId": "12345","MemberName": "Test Member"] is not a valid array. Arrays are indexed values, such as: ["Relationship", "Subscriber", "memberId", "12345","MemberName", "Test Member"] While an Object would ...


2

I got it. I had everything right but was trying to retrieve the recordid from the wrong component. My component is inside another and it's this one which is on the record page. Hope I can help someone so they won't waste as much time as me today...


2

You event.target.value is used mainly for input elements, if you pass custom data like with aura you need to use event.detail dispatchMoveItems = (event) => { const passportFields = new CustomEvent('PPFields'); this.handleEvent(evnt); this.dispatchEvent(passportFields); } handleEvent(event){ var wrapper = event.detail; ...


1

You've fallen for a common problem in JavaScript. In your LWC, the "field" property is out of scope, while in the codepen.io example, the variable field is in the "closure" for somefunction. You'll want to pass field to the other method so you can use it: picklistChanged(event) { event.stopPropagation(); ...


1

No, you cannot pass in parameters to an iterator value. Further, you can't use "expressions" as you would in Aura anyways. If you don't want/need a child component, you need to put the data to evaluate into the list: <template iterator:it={myList}> <template if:true={it.value.isTable}> </template> </template> ... this....


1

you need to stop default submit action first then do your validation, if your validation pass then submit other wise skip the submission. handleClickSaveEditedIncome(event){ event.preventDefault(); // prevent the submit action const fields = event.detail.fields; if(fields['Balance__c'] > 0){ this.template.querySelector('...


1

If you navigate via standard convert button you will find out that standard convert process calls a standard component rather than a record page action. runtime_sales_lead__convertDesktopConsole Going via same concept, if you just call this from NavigationMixin, it works perfectly fine. handleLeadConvert(){ this[NavigationMixin.Navigate]({ type: '...


1

Yes, you can. Just make sure that code that you use is licensed for you to use for commercial purposes. In this case, lwcRouter uses the MIT License, which means you can use it in your projects if you want to.


1

I struggled with this as well, and temporarily turning off the "Enable secure and persistent browser caching to improve performance" setting did not help. What I did in the end: rename my LWC component ABC to ABCVyyyymmdd (so a date specific name). Of course, I had to change the references to my LWC as well, but in my case that was not a lot of ...


1

This is already supported since Summer 21 Check it here.


Only top voted, non community-wiki answers of a minimum length are eligible