4

You can't pass it in directly. What you're expected to do is to call LDS (Lightning Data Service). You do this by importing the method and then using the magic api attribute recordId: import { getRecord, getFieldValue } from 'lightning/uiRecordApi'; import { LightningElement, wire, api } from 'lwc'; import RECORDTYPEFIELD from '@salesforce/schema/ObjectName/...


3

You're probably missing out type attribute in the columns for the formula field. Since it's a formula-text field. The default text column is applied. You need to add a type attribute to the columns for that field that should be like, columns = [ // standard text column { label: "Text Column", fieldName: "textCol", wrapText: true ...


3

Use the current index: this.TypeItemsFieldInfoOptions = this.TypeItemsFieldData.values.filter( (opt,idx) => opt.validFor.includes(idx) );


3

You just need to split the list, which you'd want to do with an @api setter. Change: @api fieldList; To: fieldListArray; @api set fieldList(value) { this.fieldListArray = (value||'').split(','); } get fieldList() { return (this.fieldListArray||[]).join(','); } From there, wire it to your method parameters: listOfFields: '$fieldListArray';


3

With the Winter '21 release, Salesforce is enfofcing the critical update Restrict Access to @AuraEnabled Apex Methods for Authenticated Users Based on User Profile (Update, Enforced) Documentation can be found here In the affected profile (Or Permission Set) Or in this section on the profile If you click the 'Edit' button, you can select the classes you ...


3

Assign the class to the users' profiles or to a permission set (and assign it to the designated users). Bear in mind that this is the kind of work you have to do to limit the user's access to any classes they are not supposed to run. Which means that if you have two sets of users that run different components, it is recommended that you create two permission ...


2

Instead of DistributionPublicUrl Use ContentDownloadUrl SELECT ContentDownloadUrl FROM ContentDistribution WHERE ContentDocumentId You must get the ContentDownloadURL in the Image Source of the Site that you want to use.


2

The API name of the custom field must end with fileupload__c. Please refer to documentation https://developer.salesforce.com/docs/component-library/bundle/lightning-file-upload/documentation


2

You don't not have any methods in the JS. The statements like if should be inside the methods. Read more here: https://javascript.info/class


2

It's not clear that you defined Timer at the class level, this would create an error. Also, members should start with a lowercase character, while classes start with an uppercase character. This is more convention than a rule, but it's a good one to follow. JavaScript is case-sensitive, so you must use innerHTML, not innerhtml. Using bind(this) is generally ...


2

You need to spilt the Roles & it'll return an array of separated elements. response.map(element => { element.AccountContactRelations.forEach(acc => { element.Roles = [...acc.Roles.split('\;')]; }); }); Which can be used further!


2

You're missing a closing curly bracket: @wire(getMyEstimate) getMyEstInfo({ error, data }) { if (error) { // debugger; } else if (data) { this.MyEstimate = data[0].sumAmount; } } // This bracket was missing Using an IDE would have pointed out this error immediately: Notice how the method starts with a purple { but "ends&...


1

This is not possible today. The Workspace API does not emit events for this kind of action. You can control when/how/what to open in the workspace using it, but you can't detect standard actions (such as when the user clicks the close icon). Also, the Workspace API is available only for Aura components.


1

Before tinkering with the value, you need to keep track of selectionStart and selectionEnd, and then restore those values afterwards. What this means specifically depends on your needs, but here is a very basic demo. As you type it will add hyphens, and deleting will (mostly) navigate correctly. Note that I made this only as a quick demo. It has significant ...


1

Your requirement should be achievable with lightning-input-field or lightning-output-field also. Based on your comment, looks like you the code snippet provided is partial and you are already using lightning-*-field in your code for other fields. lightning-button should be placed within/before the end tag of lightning-record-edit-form (see code snippet below)...


1

Yes, this can be done, as tiles do not already have a background. Here's an example that works in LWC: import { LightningElement } from "lwc"; export default class App extends LightningElement { styleName = "default"; changeStyle() { this.styleName = "whitebackground"; } } <template> <lightning-tile ...


1

I'm not 100% what you're asking, so here are my two answers to each question I think you might be asking: If you're asking on how to update a field with lightning-record-edit-form: Check out this documentation for examples on using lightning-record-edit-form. Your code will look like this: html <lightning-record-edit-form object-api-name="...


1

There is trick to show the new component and hide the current component. by using the template tag. Put both LWC component in the aura component as child render the component based on aura is true. and hide the another component on button click.


1

You should be able to see it in handleSuccess, handleSuccess(evt){ console.log(evt.detail.id); } Can you please post generateQrCode function from modal component. This error usually appears if null is passed to JSON.parse


1

I see a couple of things that needs correction in the current code, maybe because it is not the complete code. The count should be this.count. innerhtml is not a valid property of the element. It should be innerHTML. Manipulation of DOM element is something which should usually be done as a last thing, there are several other ways to achieve this using ...


1

To create a standard detail page button you will need to use an aura component as LWC does not have required interfaces like quick action, isURLAddressable. Other option: You can also create a tab on your record page (next to details and related) and house the LWC there instead of a button


1

MDN has this to say: The Proxy object enables you to create a proxy for another object, which can intercept and redefine fundamental operations for that object. In Locker Service, most objects are returned as proxies. This is a wrapper that enforces security across namespaces and components. The Proxy in your case is wrapped around the tr that you queried. ...


1

In all languages of which I am familiar, including JavaScript, executable statements are not allowed outside of a method. In both JavaScript and Apex, you'll find that this syntax is invalid: // Apex Compilation Error example public class X { Integer x; if(x == 5) { System.debug(x); } } // JavaScript Compilation Error example export default class ...


1

The catch catches the initial error, and then you throw a second one. You might consider changing your logic: public static void updateRecord(String recordId, String fieldValue){ try{ if(String fieldValue == null){ throw new AurahandledException('No field value specified'); }else{ //update Record here } ...


1

AFAIK, there is not much documentation on how exactly LDS manages its cache entries (other than details mentioned here, here, here and here). Chrome developer console's lightning > storage tab helps to some extent in observing the LDS cache data. In lack of documented mechanism, using JS maps as private fields within the lightning web component and ...


1

I see a couple of issues: A wire is always first invoked with an undefined error and undefined data value, so you should always have a structure like: if (error) { ... } else if (data) { ... } When defining the wire's received parameters this is an object with optional "error" and "data" properties. As such you should ALWAYS ...


1

The right answer is that I left checked one default CSP Directive only (it was "Allow site for img-src") for the site. When I checked all the others directives in 10 min I got a response (CSP takes time to start work)


1

Toast doesn't work in the Salesforce Mobile App container so the only way is to make a custom toast check out this link incase you need https://newstechnologystuff.com/2019/03/16/custom-toast-component-in-lightning-web-components/ Events belonging to the force namespace are not supported in Salesforce Mobile App container and If you see the aura code for ...


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