function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ArjunDharArjunDhar 

CompanyProfile Currency

Hi,

 Documents show how to set the Company Profile Currency. But I cant find the API to get the currency (Company Profile).

 

UserInfo.getDefaultCurrency() is perhaps not the same as Company Currency. Neither can I find any Standard Object representing "Company Profile".

Best Answer chosen by Admin (Salesforce Developers) 
ArjunDharArjunDhar
[SELECT ISOCode FROM CurrencyType where iscorporate=true].ISOCode.toUpperCase()

 

Frankly, am not happy with the way SalesForce naming conventions on Standard Objects is scattered all over the place.

They need to improve around here.

 

If you search Apex Developers Guide and Reference Guide for "CurrencyType" (PDF's) you dont even get all the ref material you need; and beside how does one even know that to represent attributes of "Company Profile" one has to look at "CurrencyType" in the first place. If they have their reasons for the schema thats fine, but the documentation need to provide a better context of relationships. The ERD diagrams are again not sufficient to highlight this.