+ Start a Discussion
Anais Ofranc 9Anais Ofranc 9 

salesforce mobile sdk access to UserInfo class

I have created a mobile app in Android and iOS using the Salesforce SDK. I want to add functionality of multi currency by using isMultiCurrencyOrganization() method from the UserInfo class. Now I am quite new to Salesforce mobile SDK so I don't know how I can use the methods of UserInfo class and check if user's organization has multi-currency enabled.
Gaurav NirwalGaurav Nirwal
no there is not any functionality in salesforce mobile sdk access to user info class
akhilesh_sfdcakhilesh_sfdc
You should be able to use the API wrappers to access that information in the mobile SDK. Are you building a hybrid app or native?

Mobile SDK Google+ community: https://plus.google.com/u/0/communities/114225252149514546445
Anais Ofranc 9Anais Ofranc 9
I am building a native app.

I found a solution to some extent.
I used [select IsoCode from CurrencyType where IsActive='true' ] and got a list of all the supported currencies. But this only works for multi-currency organization.
None of the fields e.g. DefaultCurrencyIsoCode, CurrencyIsoCode from objects User, Account etc. work  for a single currency organization.

So how can I fetch the default currency code of an organization which has multi currency disabled. 

Thanks
akhilesh_sfdcakhilesh_sfdc
Unfortunately, it doesn't seem like there's a SOQL query to get that information. The alternate could be to use the SOAP API and use the getUserInfo method. For iOS, you can use this library: https://github.com/superfell/zkSforce