• Edward Vazquez 6
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I have a class that posts opportunity details into a slack channel. It works fine but all currency values are being displayed without sepeators for thousands. One thousand is currently displayed as 1000.00 and I want to display 1,000 without commas. 

How do I modify this code to make those changes:


  text += '*Amount*: ' + opportunity.Amount.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
        text += '*One Time Revenue*: ' + opportunity.One_Time_Revenue__c.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
        text += '*Added ARR*: ' + opportunity.Opp_Added_ARR__c.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
        text += '*Content ARR*: ' + opportunity.Added_Content_ARR_Static__c.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
        text += '*Coach ARR*: ' + opportunity.Added_Readiness_ARR_static__c.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
I have a class that posts opportunity details into a slack channel. It works fine but all currency values are being displayed without sepeators for thousands. One thousand is currently displayed as 1000.00 and I want to display 1,000 without commas. 

How do I modify this code to make those changes:


  text += '*Amount*: ' + opportunity.Amount.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
        text += '*One Time Revenue*: ' + opportunity.One_Time_Revenue__c.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
        text += '*Added ARR*: ' + opportunity.Opp_Added_ARR__c.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
        text += '*Content ARR*: ' + opportunity.Added_Content_ARR_Static__c.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
        text += '*Coach ARR*: ' + opportunity.Added_Readiness_ARR_static__c.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';