You need to sign in to do that
Don't have an account?
Mig
Currency Format :
I've got this code :
The result of the alert is : PRICE : 567.6789
Although I would like to have this quind of format : EUR 567,68 or USD 567.68
It depends on the user ....
I've got the same problem with the date formats I've got all them in this format YYYY-MM-DD And Ofcourse it should depends on the user who is calling my S-control page .
PLEASE HELP ME =)
Thank you
Message Edited by Mig on 06-13-2008 10:54 AM
Code:
var qry = "select q.Price__c from Quotes__c q where q.Id='"+ varID +"'" ; var result = sforce.connection.query(qry); resultarray = result.getArray('records'); alert(" PRICE: " + resultarray[0].Price__c );
The result of the alert is : PRICE : 567.6789
Although I would like to have this quind of format : EUR 567,68 or USD 567.68
It depends on the user ....
I've got the same problem with the date formats I've got all them in this format YYYY-MM-DD And Ofcourse it should depends on the user who is calling my S-control page .
PLEASE HELP ME =)
Thank you
Message Edited by Mig on 06-13-2008 10:54 AM
Your variable "user" will now contain information you can utilize such as userDefaultCurrencyIsoCode, userLanguage, userLocale & currencySymbol. Simply alert the variable to see all options and formatting of results.
So There is noway to capture the values with the exact look the user have ... That's really a shame !! :(
Offcourse I can do it with the parent object :
'{!Quote__c.Quote_Date__c}'; // This will show in the S-Control the right date format of the user ...
Anyway .. Tkx a lot for your answer .. if someone else has other solution it will be great ...
Message Edited by Mig on 06-16-2008 10:51 AM
Of course there is another alternative - Visualforce .
The code for a visualforce page that shows opportunity date and amount (in a multi-currency org) as the user would otherwise see it in the standard page follows:
Yes, that's it.
The Visualforce component outputField does all the formatting automatically.
The output of that markup plus the markup itself in the "Development Mode Footer" which allows you to edit Visualforce pages "inline" in the application follows after my signature.
I should do it in Visualforce (with the Print to functionnality) instead of an S-Control. I will try that for the next relase of my application. =)
Anyway Thankx one more time to both of you for the time you spend answer my question.
Cheers,
Mig