4 votes

Passing Record Id to LWC then to APEX

I am having difficulty properly passing the records Id into the LWC and then to the APEX to properly query a list of Contacts You need to use the target lightning__RecordPage in order to allow the ...
sfdcfox's user avatar
  • 491k
4 votes
Accepted

Tooltips in LWC for template iterator are hidden by z-index

When you use Scrollable which implements scrollbar, this is bound to happen. Problem The part of the DOM which is inside scroll is limited to its own context. The standard helptext will add DOM ...
salesforce-sas's user avatar
4 votes
Accepted

Id of the clicked event from html tag in lightning component

You need to do like below:- editBudget : function(component, event, helper) { var whichOne = event.target.id; } event.target.id gives you the id defined in the div. Basically, For events ...
sanket kumar's user avatar
  • 15.3k
3 votes
Accepted

How to get reference to Component from inside an event method

You can bind it to the function call. You'd want to make the following changes: // Helper function handleMessage: function (cmp, event) { console.log('handleMessage'); console.log(JSON.parse(...
sfdcfox's user avatar
  • 491k
3 votes

How to make a Lightning Component in a Lightning record page visible to a subset of users?

If you don't mind add to the User object, just create a custom checkbox field on the User called Beta Tester and then you could conditionally show components on the page based on this true/false ...
Brian Miller's user avatar
  • 5,212
3 votes
Accepted

LWC Function calls

As you noted in your own answer, your code is missing this on the function call. It’s required because getIconType is a class method. You can learn more about JavaScript classes at https://developer....
Kevin Venkiteswaran's user avatar
3 votes
Accepted

Cannot get recordId on Aura controller

As per your function definition, the component parameter name is cmp and not component so you need to do cmp.get("v.recordId"),. Also, you will need to enqueue action like this $A....
Rahul Gawale's user avatar
  • 12.2k
3 votes

Unable to find action on Lightning Component

Controller not added on Component. Apex Controller(Server-side controller need to be added on aura:component tag using controller attribute. <aura:component controller="...
A.K.'s user avatar
  • 708
2 votes
Accepted

Why can't I apply replaceAll in my controller function?

Your diagnosis is likely correct. To avoid the problem include a null guard: return missingItems != null ? missingItems.replaceAll('Som', '###') : null; The getListOfMissingItems method may be ...
Keith C's user avatar
  • 136k
2 votes

Open Lightning component in new tab or window with standard Action button using URL

in your case you should use lightning:workspaceAPI please use below solution and post if you get any errors. refer doc for workspaceAPI cmp <aura:component implements="flexipage:...
sdandamud1's user avatar
  • 2,705
2 votes

Activate Trigger From Lightning Component

Apex trigger is the code which is directly attached to database and can be invoked ONLY by Apex DML Operations. You may use Apex class as handler/helper classes which when invoked from trigger will ...
salesforce-sas's user avatar
2 votes

Component.find not working for lightning:input

aura:id cannot be dynamically created using {!} binding. It has to be static. aura:id doesn't support expressions. You can only assign literal string values to aura:id. So you can put everything ...
salesforce-sas's user avatar
2 votes
Accepted

Spring 20 An error occurred while trying to update the record

We have resolved this issue. In aura component or lwc, when we have a if we don't specify a recordTypeId we receive the error specified: An error occurred while trying to update the record. ...
marzobryant90's user avatar
2 votes

force:recordData's recordUpdated in LWC

There's no need for such an event, because you can write a wire handler: @wire(getRecord, { recordId: '$recordId' }) someRecordWireHandler({data,error}) { if(data) { if(this.record) { ...
sfdcfox's user avatar
  • 491k
2 votes
Accepted

How to create recurring tasks via the Task component in the Account record page?

Based on this Salesforce Knowledge Article, you can't create a recurring task using Global or custom action. In order for the 'Create Recurring Series of Tasks' checkbox to display during the Task ...
salesforce Developer's user avatar
2 votes
Accepted

Event not handled

Component events can't travel "down" the hierarchy directly, beyond the point where the event is fired. Usually, the parent component would just set an attribute on the child, which would ...
sfdcfox's user avatar
  • 491k
2 votes

Custom LWC error Uncaught TypeError: Cannot read property 'apply' of undefined

The error is not descriptive enough because you have disabled Lightning Components Debug Mode for the current user. Go to Setup In quick find type 'Debug Mode' Click on the Debug Mode menu under ...
Kennedy Nyaga's user avatar
2 votes
Accepted

Cannot assert flowattributechangeevent in lwc test

You can directly mock the event using the below element.addEventListener(‘lightning__flowattributechange’, handler) Update You can also use the moduleMapper of jest configuration to make sure event ...
Mohith Shrivastava's user avatar
2 votes

Is it possible to override the edit button with lwc component/aura component? how to get the id

For Aura, use: <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,lightning:actionOverride"> Note: it is not possible to actually override using LWC (for ...
sfdcfox's user avatar
  • 491k
2 votes

How can I see how a LEX dashboard component was originally configured, after error message that field is no longer available?

Look at the Dashboard metadata. With VS Code and the CLI installed, you can run the following command in the terminal to retrieve all dashboards sfdx force:source:retrieve -m Dashboard Otherwise, you ...
Kris Goncalves's user avatar
2 votes
Accepted

LWC, show/hide on button click

There is no button with handler handleRole in the code you provided, so it's not possible to be sure, but "TypeError: Cannot read property 'apply' of undefined" is thrown when a button is ...
H Alves's user avatar
  • 794
2 votes
Accepted

Embed Managed Aura component inside LWC

No. This is an X-Y Problem. You can't access the DOM of any other component, even child components, even if they're in the same namespace, unless you have that component configured as a Light DOM ...
sfdcfox's user avatar
  • 491k
1 vote

Spring 20 An error occurred while trying to update the record

this is #spring20 know issue you can track it and work around also here Know issue
sdandamud1's user avatar
  • 2,705
1 vote

Get Field Label from history object in LWC

= is assignment, while == or === is equality. You're actually assigning the value TotalPrice__c to the variable rowData.field, and this results in a "truthy" value, so it always matches. To fix it: ...
sfdcfox's user avatar
  • 491k
1 vote

capture value from drowndown in iteration

In the Helper JS, you are passing the list of all selected products and list of all picklist values; and in the corresponding apex code, you are using them in nested for loops. This will create an ...
arut's user avatar
  • 5,281
1 vote

How to use window.open in lightning components?

After tracing through the source, it looks like using an undefined first parameter is what causes this behavior. You can fix the first part by explicitly providing an empty url: const otherWindow = ...
sfdcfox's user avatar
  • 491k
1 vote

Passing List of Accounts to aura iteration and displaying them in component

Lightning/Aura/LWC/JavaScript is cAsE-sEnSiTiVe. You have a few issues: Wrong => Right Aura:attribute => aura:attribute {!acc.id} => {!acc.Id} {!...
sfdcfox's user avatar
  • 491k
1 vote
Accepted

Setting the case status using the lightning component through the quick action

You also have to set mode="EDIT" for that like this <force:recordData recordId="{!v.recordId}" fields="['CaseNumber','Status']" targetFields="{!v.record}" ...
User6670's user avatar
  • 3,016
1 vote
Accepted

Problem setting component attribute

Actually, there is no checked attribute for lightning:radioGroup. So that might be causing the error and you need to remove it. checked="{!v.amountDue} If you want to set a value, you can use ...
manjit5190's user avatar
  • 8,023
1 vote

Spring 20 An error occurred while trying to update the record

We are encountering the same issue with an aura component using the lightning:recordEditForm tags. Our prod environment is on Winter '20 and it works just fine but the sandboxes are Spring '20 and we ...
Dasos's user avatar
  • 29

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