We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

1

To use Javascript and a lightning web component instead of aura you can use a dynamic class change variable for the section. <template> <div id="ExpandableCalendarSection" class={BookCalClass}> <h3 class="slds-section__title" style='padding-bottom:0;'> <button aria-controls="expandoBookingCalendar" aria-expanded="true" ...


0

It seems like setting the required attribute is causing this behavior and there is no way to disable it. You may want to try one of the messageWhen* functions or the validity function. However this will make you lose the red asterisk. In that case you may have to build the input yourself based on the https://www.lightningdesignsystem.com/components/input/#...


0

This link has information on how to get a survey link: In the Survey Builder, select Send | Get Link. Select whether you want to send your survey to participants within your company or outside your company. Select the settings for your survey invitation. Copy the survey link, and send it to your participants. Once you get the link you can ...


1

The reason you're getting the error (which doesn't provide an answer to the real basis your question) is because of this: if(component.get("v.selectedLookUpRecord").Id != undefined){ conObj.AccountId = component.get("v.selectedLookUpRecord").Id; } Basically, it looks like component.get("v.selectedLookUpRecord") is returning a null and hence the error ...


0

A little bit changing and everything is okay! <aura:if isTrue="{!v.field.fieldType == 'url'}"> <a href="{!'/' + v.field.data}">{!v.field.data}</a> <aura:set attribute = "else"> <div class="slds-truncate" >{!v.field.data}</div> </aura:set> </aura:if>


0

The attribute in the child is of Type List, and the list doesn't have any attribute like fieldType, data. See your code below: <aura:attribute name = "field" type = "List"/> So if you are passing the list then you will need to use aura:iteration. If you want to add some extra data with list you can create a wrapper object like { fieldType: '', data :...


1

# is for 1 time binding, only the value passed/assigned before UI renders will be shown in UI and any further changes will not reflect in UI, so, it is recommended to use ! if you want to reflect the changes dynamically. Also you should use v. in component. Below change in soqlField component should work: <aura:if isTrue="{!v.field.fieldType == 'url'}"&...


0

Change this <c:soqlField field="{!field}"/> to <c:soqlField field="{!v.field}"/> . You are missing the access provider v.


0

For anyone stuck on at least getting to to the first level this worked for me. I am now trying to work on making this dynamic but there is an app in the exchange that will beat me to this AiflyHierarchy. Apex public with sharing class AccountController { @AuraEnabled public static List getAccountChildren(Id accountId){ List accountcontacts =...


2

In JavaScript, you can simply write: var selectedRecordIds = allRecords.filter(row=>row.Checked).map(record=>record.Account.Id); There might be something else going on, as JavaScript should require only a small fraction of a second on a modern computer to complete this task. I just tested this in a script on my browser: var x = []; while(x....


2

You use the Element click method. Here's an example: var a = document.createElement('a'); a.href = 'some file url'; a.click(); Note that browsers will typically block this type of script unless the user clicks a button. You might not be able get a "mass downloader" working in any modern browser because of this restriction.


0

I developed a LWC progress-ring component. The code is available here Quite easy to integrate :) I hope that will helps you


1

Maybe you can try assigning default values to these attributes during onInit method handler


0

Ok, ended up finding the answer, I used ontouchmove for detecting swipe events, event returns a touch object in an event.touches array


0

helper.getAccount is asynchronous. This means that until your init method has finished, myAccount will definitely be a null value, as you haven't had a chance to visit the server yet. You'll need to set mapMarkers after you've had a chance to load the data from the server. You'll want to read about how to Write Asynchronous JavaScript for more information on ...


1

I was going to suggest column type url, but since this behaviour isn't wanted you can use lightning:navigation and see if you can format your columns with this behavior. ({ handleClick: function(cmp, event, helper) { var navService = cmp.find("navService"); // Uses the pageReference definition in the init handler var ...


0

Just for the information. I had the same issue and as a workaround I implemented following. JS Code @track selectedRowIds = []; onRowSelection(event) { var rows = event.detail.selectedRows; this.selectedRows = []; this.selectedRowIds = []; rows.forEach(row => { if(!mycondition_to_disable) { this.selectedRowIds.push(...


0

First of all, aura:id="{!filter.id}" is not supported. You cannot use expressions in aura:id. Secondly, to get a hold of the value in question, you can use closest as a way to get an attribute up the DOM. That would look like this: <lightning:layout> <div data-filter-id="{!filter.id}"> ... handleFilterChange(c,e,h) { var filterId = e....


0

I made a method to use as a utility for making toast messages <aura:component description="AuraUtils"> <aura:method name="showToast" action="{!c.showToast}" description="Used to show a toast message" > <aura:attribute name="title" type="String" description="title of toast" /> <aura:attribute name="message" type="String" ...


1

There is no direct support for this but you can use Lightning Design System to create this component. You need to use slds-form-element and combine two base components lightning:input and lightning:buttonIcon to create the Inpute element with eye Icon. With the help of JS controller you can toggle the type of the Input element betwwen text and password. Also ...


0

You can do that by applying an onchange attribute on your field. onchange={yourmethodhere} Then on your JS add a function: yourmethodhere: function (component, event, helper) { // Your code here } These are the basics... Applying the onchange to the field that you want to add the logic is basically the first thing you need to do. Them make sure that ...


1

When you use a function for a wire, but still want reactive behaviour against the result of that wire, you need to introduce a separate variable declaration, like: @track registro; @wire(getPagedContactList, { objectToDisplay: '$objToRender', nameSearchKey: '$nameSearchKey', maxNrRecords: '$maxf', pageSize: '$pageSize', pageNumber: '$...


1

extends="force:slds" include this at the top in your application like <aura:application extends="force:slds">


0

A component event will not be caught by child components and while an application event will be caught, it's very expensive and inefficient - it really should be only used when absolutely necessary - ie communication between unconnected sibling components for example. To communicate with a child, you can use an attribute (with or without a change handler) ...


0

You could write a trigger (before insert and update) which calls a future method, which then creates the pdf from your Visualforce page and attaches it to the record. The trigger would allow you to automatically save the pdf. The apex future method is necessary because the PageReference.getContentAsPDF() method isn't allowed in a trigger. I hope that helps....


0

I had to add the field to the layout for the field value to display in the lightning card.


2

If you are using aura components, this is the syntax: <lightning:helptext content="The tooltip displays on the lower left of the icon or above the icon if space is available. It automatically adjusts its position according to the viewport."/> It's explained in this article


4

You can use an auraAttrubute to store the page you want to use. <aura:attribute name="pageName" type="String"/> How can you choose the page to use? Sorry, but i don't have enough reputation to comment your post, so i used this way :D


0

The PDF feature cannot execute JavaScript. As such, you can't use Lightning components in a PDF. You'll need to code your page issuing normal HTML or Visualforce components instead.


0

We can make use of Lightning Data service to access any of the user fields on the Lightning component without need to use apex controller. Example: <aura:attribute name="currentUser" type="User"/> <force:recordData aura:id="recordLoader" recordId="{!$SObjectType.CurrentUser.Id}" fields="Profile.Name" targetFields="{!v.currentUser}"/> Access ...


1

The solution is simple actually it seems the standard DependentPicklist attempts to cache the initial values if they come directly from the object you have queried. To fix this issue, simply create a assignment element with the dependent and controlling picklist values as a text variable and use those values in Picklist 1 value, Picklist 2 value and even ...


0

You may find that your User>Profile>Name is "System Administrator". Check in Setup>Profiles. You can also use filter logic for more complex conditions.


2

Try This : var tablecomp = component.find('WrapperTable'); selectedRows = tablecomp.getSelectedRows(); Where WrapperTable is auraid of your Lightning List View


0

This is because ui:outputDate shows time in UTC, but lightning:formattedDateTime shows time based on runtime environment's time zone which will be different based on location. If you want this to be specific time zone then you can set that using timeZone attribute of lightning:formattedDateTime. The time zone to display. Use this attribute only if you ...


0

Your query is trying to group on permissionRead, that is not allowed so this will be your apex method @AuraEnabled public static List<AggregateResult> getProfileInfo() { List<AggregateResult> plist = new List<AggregateResult>(); plist = [SELECT Parent.Profile.Name, COUNT(SObjectType) Quantity FROM ObjectPermissions ...


0

I don't really know why this happens on Chorme\ Explorer - But on Firefox it's working fine. Because this is an uncomfortable solution I will not post this as an answer. Hoping for someone who can share his knowledge about this - for entering to docs with the same browser I'm working on... Not working : 1.Clear the browser cache 2.Incognito mode


1

Update for whoever gets to this question or are facing this issue. We went back to Salesforce on this and they confirmed that Horizontal Scroll on iOS devices is a known issue (citing the same known issue as in the question body) and that the Product Team has this on their roadmap with no timelines available as of yet. Also there was no workaround that ...


0

Assuming that you have the ContentDocumentId of the file, then use lightning:fileCard to display the preview of the file. This is compatible with Lightning communities <aura:component> <lightning:fileCard fileId="069XXXXXXXXXXXX" description="Sample Description"/> </aura:component> Refer to full documentation here


0

You can use length property to return the number of elements in an array, like this : Return the length of an array: array.length This component code should work <aura:component controller="accWithContController"> <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> <aura:attribute name="ListOfAccount" type="Account[]" ...


1

It's possible, but it's tricky and likely unwise except in highly restricted use cases. You can programmatically create Apex classes via the Tooling API or the Metadata API (via, perhaps, the apex-mdapi wrapper). Declarative Lookup Rollup Summaries is a well-known application that does this. Note that the user under whose authentication you make the ...


-2

As above //get today's date var today = new Date(); var dd = String(today.getDate()).padStart(2, '0'); var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0! var yyyy = today.getFullYear(); however, if your local time format is different (e.g. UK), change the order. today = yyyy + '-' + mm + '-' + dd; You can also add a time if your ...


0

From the documentation itself- https://developer.salesforce.com/docs/component-library/bundle/lightning:actionOverride/documentation, it states that this interface has no effect except when used within Lightning Experience and Salesforce1. Which is why it isn't working in communities.


0

As per the error, you are not using aura tag ltng:require, Please Read Documentation, to use an external resource like CSS or javascript. You need to upload your files into static Resources. After upload use ltng:require aura tag to import file from the static resource, please read the documentation.


0

Please add this site domain in CSP Trusted Sites in salesforce this is cumpulsary when we are calling the third API using Frontend So we need to add its domain in CSP Trusted Sites Go to Setup > CSP Trusted Sites and add your url by clicking on new for example https://developers.docusign.com . thanks


1

Use onkeypress to get old value on this event it will return the value before pressing keys and to get new value please use onkeyup then it will give new value. So you need to use two events onkeypress and onkeyup and it will work. thank you


0

Go to Setup > Security Controls > Session Settings and uncheck: "Enable clickjack protection for customer Visualforce pages with headers disabled" I think that this should fix that issue. There is an explanation on why this could be failing: Check this answer.


0

Waa this ever addressed? Experiencing the same in the aura lightningviewform making it useless for me. Was a fix only applied on the lwc version and not aura? If so I'll rewrite in that as I need the functionality of outfield but I needed it to refresh when I tell it to!! Frustrated to say the least


1

I don't know for sure about the different environments issue (Sandbox vs Production), but one issue that I'm pretty sure of is that there is a case sensitivity mismatch here. In the prereq object, I see that the field is defined as: Other_Academic_institution__c However, in the console log and commented out if statement, you have the field defined as: ...


0

Can you please Replace <aura:attribute name="recordId" type="Id" access="global"/> With <aura:attribute name="recordId" type="String" access="global"/>


1

doinit is for initialization where the dom and listeners are not ready ({ doInit: function(component, event, helper) { if ($A.get("$Browser.isPhone")) { component.set("v.isMobileorTablet", true); } else if ($A.get("$Browser.isTablet")) { component.set("v.isMobileorTablet", true); } else { var editRecordEvent = $A.get("e....


Top 50 recent answers are included