Background
Our system contains 2 parts(Web Part and Mobile Part). And the mobile part is implemented with SFDC iOS SDK.
Issue
Recently, user reported that some data in iPad was different from the web part. We checked, the data is retrieved via iOS SDK Rest API and the value was changed.
For example:
The Base_Price__c
is 74.10000 in Web. But the we got 74.09999999999999 via iOS SDK Rest API.
Why is the field of data type number storing more numbers in decimal places than defined?
Additional information
- It works well in the past.
- We tried to reset the value in Web Part, the issue still is existed.
- We tried with Rest API of Workbench, no issue.
- We tried to get the data with data loader, no issue.
- Field:
Base_Price__c
Data Type: Number (Number Options: Length 13 Decimal Places 5) SFDC iOS SDK :"v23.0" - iOS Source:
NSString * soql = select Id,.....,Base_Price__c,...... from Product__c - (SFRestRequest *)requestForQuery:(NSString *)soql;