Community
Showing results for 
Search instead for 
Do you mean 
Reply

Data/Currency/Number formatting in ToString

Highlighted
Copper Super Contributor
Posts: 485
Country: Australia

Data/Currency/Number formatting in ToString

[ Edited ]
MutableEntityFieldDescriptor oAccFUM = Act.UI.ActApplication.Instance.ActFramework.Opportunities.GetMutableEntityFieldDescriptor("TBL_OPPORTUNITY.CUST_AdviceFUM_050239770", true);
                            foreach (Opportunity opp in cOpp)
                            {
                                oMsg.HTMLBody += " blah blah blah" + oAccFUM.GetValue(opp) + "blah blah blah";
                            }

 

Can anyone help me with formating the number??

I have a custom field in each Opportunity, and then for each opportunity in the Contact's list i pull the number into a table

Everything works fine except there is no formating

 

In Act its in a Currency Field and displays as $0,000,000.00

 

In the code it displays as 0000000.00

 

Its been frustrating me for so long given its apparent simplicity, but i am stumped and would like some help Smiley Happy


Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version 17.1.169.0, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6
Copper Super Contributor
Posts: 485
Country: Australia

Re: Data/Currency/Number formatting in ToString

I finally worked it out

string.Format("{0:#,0.00}", oAccPUM.GetValue(opp))


Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version 17.1.169.0, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6