New answers tagged

0

You first need to add the appropriate interface: <aura:component implements="force:hasRecordid"> And then add a handler to listen for changes: <aura:handler name="change" value="{!v.recordId}" action="{!c.loadRecord}" /> Or, you can also use <force:recordData>: <force:recordData recordId="{!...


0

You can use force:closeQuickAction after doing your work to close the modal. It will still briefly appear, but then disappear afterwards. You might want to just add a lightning:spinner while your code is working so the users understand something is happening.


0

You can use a property with getter and determine for the entire error message whether to show or not, instead of adding the flag checks in template. It would look something like this. get showError() { return isFlagA || isFlagB; } <template> <template if:true={isOn}> <div if:false={showError}>Normal HTML</div> <div if:...


0

The most literal interpretation in Aura would be: const myInput = component.find("myInput"); let value = myInput.get("v.value"); value += "\n"; myInput.set("v.value", value); Where myInput is defined on the component as its aura:id: <lightning-textarea aura:id="myInput" ... Feel free to change this as ...


3

You don't need to chain most of the methods, because they're independent. Aura is perfectly capable of calling many different methods at once. As such, you can use Promise.all to call the methods. It looks like the first method will inform the later methods of what they should do, so you can: doInit: function (component, event, helper) { helper ....


0

<lightning:tabset> and <lightning:tab> allow you to create a tabbed interface, which would be an appropriate use case here.


3

Try to add this to the Renderer.js of your Aura: rerender : function(component, helper) { this.superRerender(); let recordTypeId = component.get("v.pageReference").state.recordTypeId; component.set("v.selectedRecordId", recordTypeId); } This should be called automatically each time your Aura appears on the screen.


0

The issue is that through LWC component, refresh action needs to be fired. I would suggest you to create and call LWC directly using a quick action. Following links can help: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_quick_actions_screen https://developer.salesforce.com/docs/component-library/bundle/lightning-quick-...


2

The reason why you're stuck is because what you're trying to do is not possible. There is no expression function that allows to you see if a value is contained in a list of values. I stated as much in my previous answer to your previous question. What you need to do is place the desired class inside the data, like this: <lightning:button title="{!...


1

First of all, an aura:id can't be dynamically set. Forget about aura:id to find something in an iterator. And I didn't get why you have a title {!v.document.id} in your button. Would you not rather refer to the item that you iterate on here (which makes it wrong to refer to the value provider "v")? In any case - let's assume you have a Lightning ...


0

try it like this :- onSubmitHandler(event) { event.preventDefault(); // Get data from submitted form const fields = event.detail.fields; // Here you can execute any logic before submit // and set or modify existing fields fields.Name = fields.Name + fields.Phone // You need to submit the form after modifications this.template .querySelector('lightning-...


Top 50 recent answers are included