• SoporteICO
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

I'm having an issue when formating currency in Apex.

 

I have this method in my VF extension:

public String getPrice(){
     List<String> formatter= new String[]{'0','number','###,###,##0.00'};
     String priceT = String.format(this.aux.Total_Price__c.format(), formatter);
     return priceT; 
}

The Total_Price__c field is currency type from a custom object.

I set the variable output to the VF page with:

<apex:pageBlockSectionItem >
    <apex:outputLabel value="Total Price"/>
    <apex:outputText value="{!price}"/>
</apex:pageBlockSectionItem>

 

My problem is that if the price has only zeros in decimal places it shows the number as an integer (no decimals at all), also if the price has more than 2 decimals the output shows all of them.

 

I want to always show 2 decimals no matter what.  

 

Hi, When I create a Google Alerts Search Term in an account and change the Chatter News Alerts Status to "Sing Up", it do not change to "Active". How long do I need to wait so that the Status goes from "Sing Up" to "Active"? One day?

 

Please I need help with this.

I was able to successfully install the Chatter News Alert application. The setup/configuration procedures, steps 1 and 2 were followed without issue.


The fields were added to the Page Layout "Account" per instructions. 

In attempting to test the app from an Account Page, the App field "Chatter News Alerts Status" which is a listbox with a field option to "sign-up" appears to be inactive (grey out and unable to select). 

 

I was able to run a successful test on the app apex.

 

Any suggestions or similar expeirence?

 

Thanks in advance.

 

Stuart