People who code: we want your input. Take the Survey

New answers tagged

0

You seem to know one technique already for conditional rendering - programmatically adding and removing the slds-hide class - but your logic is written incorrectly. if(changeElement != null) // $A.util.removeClass(changeElement, "slds-hide"); // by using $A.util.toggleClass add-remove slds-hide class { $A....


0

I had a similar requirement. I used this package. It might help you too: https://unofficialsf.com/show-toast-flow-action/


0

I think the best way is to remove the modal and use a lightning:card instead. try this code <aura:component> <lightning:card title="Cancel Order"> <p class="slds-p-horizontal_small"> Are you sure you want to cancel this order? </p> <aura:set attribute="footer"> <lightning:button name='No' ...


1

You can access the Helptext in apex using - String helpText = SObject.FieldAPIName__c.getDescribe().getInlineHelpText(); replace sobject name and field api name with the object and field for which you need the help text.


1

Array.prototype.find() is your friend =) you simply need to match against your record id: <Array>.find( element => element.id === <yourRecordId>) this will return the first element matching element.id === <yourRecordId>


0

I found that I could fix the issue I was having with Conga (different app same error message) via salesforce settings In the setup menu > security > Session Setting Update the following Adding the visual force page to the Trusted Domains and by also checking "Enable XSS protection" checkbox on that page (just make sure to hit save on the ...


1

The expression syntax for Aura components is {!...}. When you are inside of the expression (the ... from before), ! is the "not" expression operator. For example, {!!v.isRequired} means "return true if isRequired is false". Sometimes, people may think that the ! is meant to denote the variable, as in: `{!v.isRequired && !v.isEmpty}...


0

c.Child is the incorrect component name, it should be c:Child. The reason why is because of XML and how names are defined. The <x:y> syntax means "the component y in the namespace x," while <x.y> means "the component x.y in the default namespace." As you can hopefully see, these are two different definitions, and should yield ...


1

You could use binding: Define an attribute called dashboardLinkClass <aura:attribute name="dashboardLinkClass" type="String" default="active"/> reference that in your link: <a aura:id="Home" href="{!v.status}" class="{!v.dashboardLinkClass}" alternativeText="DASHBOARD" ...


0

Try this one .cls throw new AuraHandledException('A customer with this email address already exists'); .js controller else if (state === 'ERROR') { var errors = response.getError(); if(errors) { if (errors[0] && errors[0].message) { var errorsMsg = []; errorsMsg.push(errors[0].message); cmp.set("v.errors&...


4

You should use LWC unless a feature is not supported. In the interest of creating a future-proof answer, I will not provide any specific restrictions here, as this list is quickly being whittled down release after release. You need to consult the documentation and/or Release Notes to see if a given feature is supported or not. Your general development ...


0

The below solution actually worked for me. It had extra '!' which caused the problem: <lightning:input name="user" placeholder="Search" value="{!isCreate == 'true' ? acc.user : acc.owner}"/>


3

Looks like it is a query exception and has nothing to do with way you are passing in the attributes. Try using the below return Database.query('SELECT Date__c, Base_Currency__c, ' + currencys + ' FROM Exchange_Rate__c WHERE Date__c = :dateExchangeRates'); Note apex variables are automatically resolved for you


1

When referencing the component from the managed package, replace c:name with namespace:name where namespace is that of the managed package containing the component.


1

There's no native component we can use to render a chart*. However, you can easily use something like d3.js in a component (not my post, but really informative!). Once you've gotten your data mapped out correctly, it's simply a matter of putting the data into the chart. You can also find tons of other examples out there on the Internet if you look around a ...


1

Unless you want to do it server-side, which is certainly an option, you can write it as a relatively simple client-side action. First, we have to compute the ID, because the record Id won't be unique in our case. We're going to have to change each record into several rows. That means we're going to change the markup to look like: <lightning:datatable ...


0

It seems that this is not supported. There is an open Idea here and a confirmation from SF that you cannot add predefined template in quick action. See here Predefined email templates is not yet supported. The Template field was added to support Classic Email Templates and should not be used to predefine templates. Also looking at fields for this actions, ...


1

(Non-trigger) auto-launch flows have no ability to present messages since they run in a "headless context" - as the documentation says, they run in the background and are asynchronous. You can initiate them from all sorts of places: Through the UI By a standard or custom REST API By a scheduled job In async code etc. Only the first scenario would ...


0

The Create a Lightning Web Component Action was in pilot in Spring 21 and was made GA in recent release - Summer 21. You need to be enrolled in pilot on the org on previous release OR wait till Jun 12 for you org to get upgraded. Update You have too much empty space on your component. The scroll bars depend on screen size and resolution. You may want to ...


0

You didn't query the opportunity at all, and you didn't match up the field name to the returned data. As you can see, the rows are present, but not showing anything. For example, the account name should be: {label: 'Account Name', fieldName: 'Name', type: 'text'},


0

So you need to add the Account link to the new Contact. To do that, use recordId param you have implicitly on your Aura Component Aura component: add this near other aura:attribute rows <aura:attribute name="recordId" type = "String"/> It will be prefilled automatically with Account Id Then send this Id to the server (in JS ...


Top 50 recent answers are included