Skip to main content
added 27 characters in body
Source Link
Martin Lezer
  • 7.3k
  • 5
  • 27
  • 41

[Background] OurBackground

Our system contains 2 parts(Web Part and Mobile Part). And the mobile part is implemented with SFDC iOS SDK.

[Issue] RecentlyIssue

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

For example: The "Base_Price__c"

The Base_Price__c is 74.10000 in Web. But the we got 74.09999999999999 via iOS SDK Rest API. Why

Why is the field of data type number storing more numbers in decimal places than defined?

[Additional information]Additional information

  1. It works well in the past.
  2. We tried to reset the value in Web Part, the issue still is existed.
  3. We tried with Rest API of Workbench, no issue.
  4. We tried to get the data with data loader, no issue.
  5. Field: Base_Price__cBase_Price__c
    Data Type: Number (Number Options: Length 13 Decimal Places 5) SFDC iOS SDK :"v23.0"
  6. iOS Source NSString * soql = select Id,.....,Base_Price__c,...... from Product__c: NSString * soql = select Id,.....,Base_Price__c,...... from Product__c - (SFRestRequest *)requestForQuery:(NSString *)soql;
  • (SFRestRequest *)requestForQuery:(NSString *)soql;

[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]

  1. It works well in the past.
  2. We tried to reset the value in Web Part, the issue still is existed.
  3. We tried with Rest API of Workbench, no issue.
  4. We tried to get the data with data loader, no issue.
  5. Field: Base_Price__c
    Data Type: Number (Number Options: Length 13 Decimal Places 5) SFDC iOS SDK :"v23.0"
  6. iOS Source NSString * soql = select Id,.....,Base_Price__c,...... from Product__c
  • (SFRestRequest *)requestForQuery:(NSString *)soql;

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

  1. It works well in the past.
  2. We tried to reset the value in Web Part, the issue still is existed.
  3. We tried with Rest API of Workbench, no issue.
  4. We tried to get the data with data loader, no issue.
  5. Field: Base_Price__c
    Data Type: Number (Number Options: Length 13 Decimal Places 5) SFDC iOS SDK :"v23.0"
  6. iOS Source: NSString * soql = select Id,.....,Base_Price__c,...... from Product__c - (SFRestRequest *)requestForQuery:(NSString *)soql;
Source Link

The value retrieved via iOS SDK Rest API is different from the web part

[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]

  1. It works well in the past.
  2. We tried to reset the value in Web Part, the issue still is existed.
  3. We tried with Rest API of Workbench, no issue.
  4. We tried to get the data with data loader, no issue.
  5. Field: Base_Price__c
    Data Type: Number (Number Options: Length 13 Decimal Places 5) SFDC iOS SDK :"v23.0"
  6. iOS Source NSString * soql = select Id,.....,Base_Price__c,...... from Product__c
  • (SFRestRequest *)requestForQuery:(NSString *)soql;