Salesforce: How to get field value in aura attribute and use if statement in component
I'm new to Salesforce development, but not new to web development (Angular, React, C#, JS, etc...). So it's been very frustrating that I cannot get something so simple as the example below to work. I want to display content based upon a condition of a custom fields value: <aura:component controller="MyTestController" implements="flexipage:availableForRecordHome,force:appHostable,lightning:actionOverride,force:hasRecordId"> <aura:attribute name="oppty" type="Opportunity" /> <article class="slds-card"> <aura:if isTrue="{!v.oppty.MyCustomField__c == 'hello'}"> Hello </aura:if> <lightning:button l
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.