• Graeme Smith 7
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I was having a go at trying to implement a custom notification according to this site: https://lightningdesignsystem.com/components/notifications/ and adding it to an aura component. 

Versus the examples the first issue I had was it didnt want to save with svg tags, so I replaced those with <lightning:icon/>. The notification now displays okay but when I click the dismiss/close icon nothing is happening. There is no mention on the page of needing a custom controller or anything, but am I missing something?

My modified code is below.
 
<aura:component implements="flexipage:availableForRecordHome, force:hasRecordId">
  <div class="Breach-Notification" style="height:0rem">
  <div class="slds-notification-container">
    <div aria-live="assertive" aria-atomic="true" class="slds-assistive-text">Breach Imminent!</div>
    <section class="slds-notification" role="dialog" aria-labelledby="noti52" aria-describedby="dialog-body-id-49">
      <div class="slds-notification__body" id="dialog-body-id-49">
        <a class="slds-notification__target slds-media" href="javascript:void(0);">
          <span class="slds-icon_container slds-icon-standard-event slds-media__figure" title="Action now!">
          	 <lightning:icon iconName="custom:custom82" size="large" alternativeText="Action"/>		
          </span>
          <div class="slds-media__body">
            <h2 class="slds-text-heading_small slds-m-bottom_xx-small" id="noti52">
              Breach Imminent</h2>
            <p>This is just a test - don't panic!</p>
          </div>
        </a>
        <button class="slds-button slds-button_icon slds-button_icon-container slds-notification__close" title="Dismiss Alert">          
   			 <lightning:icon iconName="utility:close" size="xx-small" alternativeText="Close"/>			
          <span class="slds-assistive-text">Dismiss Alert</span>
        </button>
      </div>
    </section>
  </div>
</div>
</aura:component>

 

I have the following SOQL used in a VisualForce page:

 

"Select c.Product__r.PA_Product_Class__c productClass, sum(c.Rolling_12_Current__c) sales from PA_Customer_History__c c where c.Account__c = '{!account.Id}' group by c.Product__r.PA_Product_Class__c"

 

The field Rolling_12_Current__c is a currency field and the records I am querying are all in USD. Our corporate currency is EUR. My user is set up with a currency of USD. When the query is run, the sum() returns back a converted value in EUR instead of USD. According to the documentation at http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_querying_currency_fields.htm, this shouldn't happen: "Currency data is converted to the user's locale and then processed by the aggregate function."

 

My user's currency is in USD, so it should display it properly in USD. As a temporary work around, I've changed our exchange rate to 1. Can someone please let me know how I can get the SOQL aggregate to return the values in my user's currency? I tried using convertCurrency, but I get a malformed query error.