4

If you don't have a Lender Account parent record, then, this error will occur. You can either do a null check in the code or make a calculation field to resolve the name in the database. In the Javascript controller you can extract the name into a variable: let lenderAccountName = opportunity.Lender_Account__c ? opportunity.Lender_Account__r.Name : "&...


3

LWC1509: Sorry, you've chosen the wrong JS platform. Please wait until 2022 to use modern syntax like this. First, that's a cynical view point. Second, such a statement would have to be #SafeHarbor bound, and that's generally more trouble than its worth. Third, this feature apparently came around right around November 2020, which would have been very close ...


3

Without the @AuraEnabled annotation on attributes the attributes are not included in the JSON response. To remedy this, update your response class thus: public with sharing class ResponseNAC { @AuraEnabled public Locality locality = new Locality(); @AuraEnabled public NACError nacError; public class Locality { @AuraEnabled ...


2

The lightning-map base component doesn't support this out of the box but you could build a custom component that replaces the location list that's displayed as a sidebar. Here are some tips (not a complete walkthrough) on how to this: Start by disabling the default location list view by adding list-view="hidden" to lightning-map. lightning-map ...


2

lightning-combobox does not support multiselect. You'll have to use lightning-dual-listbox Also, the correct way to pass options to a lightning-combobox or lightning-dual-listbox is to pass list of objects with value and label property. Markup - <lightning-dual-listbox options={options}></lightning-dual-listbox> JS - export default class ...


2

The problem is you have written S capital in salesforce while importing the fields in your JS file. What you have is:- import NAME_FIELD from '@Salesforce/schema/Account.Name'; where as the correct import statement is :- import NAME_FIELD from '@salesforce/schema/Account.Name';


2

You could do something like this in VF. <apex:page> <script> function getBase64FromCallout(){ //Make a callout to fetch base64, you may use VF Remoting or VF action function to get the base64 string } window.addEventListener("load",function (){ let base64 = this.getBase64FromCallout(); let pdfurl =...


2

I believe this is the kind of thing you will find on LWCs that are not supported on the platform. There's a difference. Lightning Web Components do not necessarily need to be deployed within the Salesforce platform. In this case, you handle the source code and you have your own compiler. In this scenario you can set that flag and probably other ones. When ...


1

This tripped me for a good while. The success event is returned from the User Interface API (specifically a Record event) after the request from the component is saved. This has the benefit of allowing the values from formulas and automated processes to come back in the response. The key thing that I was missing was that the UI API response only contains the ...


1

This community won't know your original intentions with the @track decorator it's no longer required so you can remove the annotation altogether at statement 1. You can also remove the line below it (statement 2) as it's redundant to statement 1.


1

From the documentation, the second paragraph explains when @track is needed. So it is not needed for your example. You may find it used unnecessarily in older code, as AFAIK in early versions of LWC it was required for simple properties too. @track Fields are reactive. If a field’s value changes, and the field is used in a template or in a getter of a ...


1

No, wire methods cannot be called imperatively. Use Apex in these scenarios: ... To call a method imperatively, as opposed to via the wire service. You may want to call a method imperatively in response to clicking a button, or to delay loading to outside the critical path. When you call an Apex method imperatively, to refresh the data, invoke the Apex ...


1

This appears to be flawed. The Phone field is shown as a demonstration of data that will be present in the class, but not sent to the client (because of the missing @AuraEnabled). However, you don't need the zero-args constructor here. Constructors are not called during deserialization of a parameter, so you don't need it, even if you have another ...


1

You should use a namespace prefix for your query parameter. If the component isn’t part of a managed package you should use c__ as prefix. So the button url would be /lightning/n/Cops_Rate_Profile_Tab?c__MDMID={!Account.Master_Customer_ID__c} and in the controller you should get c__MDMID. Please refer to the documentation about query parameters.


1

You are dispatching the custom event 'change' but that won't automatically have a detail associated with it. So event.detail is null in this case. The custom event will have a target since you are calling it on the startDateInput. I guess behind the scenes, when using it live, the lightning input is associating the detail with the value of the input field, ...


1

Okay so it turns out it has nothing to do with the 'getRecordNotifyChange' itself, there was another issue in the test that was causing it to fail. For some reason, it was reporting this weird error. I wrapped the getRecordNotifyCall under a method in another helper class, and mocked that method using jest.fn(). That seems to be working okay. Posting in case ...


1

As per doc, By default, guest users can’t upload files and don’t have access to objects and their associated records. To enable guest users to upload files, enable the org preference Allow site guest users to upload files. However, even if you enable this setting, guest users can’t upload files to a record unless guest user sharing rules are in place. The ...


1

The NavigationMixin solution should work as well, with minor modification. According to this blog post, rather than using NavigationMixin.Navigate with type argument standard__namedPage and ContentDocumentId, you should be using standard__webPage along with the file URL. previewFile(file){ if(!this.usedInCommunity){ this[...


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