Questions tagged [double]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
30 views

Prevent the double lightning header while navigation to Lightning Web Component

I have a Lightning web component which doesn't fit in the half-sized modal popup screen but I need to open it from the action on the record page. I have found an interesting idea about how this can be ...
user avatar
  • 13.2k
0 votes
1 answer
483 views

Round Double to three Decimal places

Dear all I am trying to round a Double number with three decimal places: Double tl = (tReadTotal/totalRead).setScale(3); c.CAC_Lectura__c = tl; Doing this it does not work, How can I do that??
user avatar
2 votes
1 answer
5k views

Invalid conversion from runtime type String to Double

Background I am getting this error: Invalid conversion from runtime type String to Double On this line of code: line.put(targetField, (Double)fieldValue); The variable fieldValue is of type ...
user avatar
  • 8,213
0 votes
1 answer
972 views

Is Scientific notation allowed in double

Apex document clearly says, Scientific notation (e) for Doubles is not supported. But again, Salesforce Object Reference guide says, Values can be stored in scientific notation if the number is large ...
user avatar
  • 101
1 vote
1 answer
2k views

Convert double to String

I have the following double from salesforce as a number = Latitude = 50.916408140415314 I want to convert it to a string. However when I convert it to a string like this: string.valueof(latitude) i ...
user avatar
15 votes
3 answers
17k views

Decimal or double?

What datatype should I use in Apex Classes when I need to store a number with decimal places. What do you use and why?
user avatar
  • 697
0 votes
3 answers
914 views

round a value to .0 or .5

I'm looking for a way to round a value to .0 or to .5, so 1,34 would become 1.5, 1.22 would become 1.0, 1.63 would become 1.5, and 1.79 would become 2.0. Is there a function to accomplish ...
user avatar
  • 71
3 votes
1 answer
735 views

Salesforce API query encountering error with large integer / double

I'm having an issue querying the Salesforce API with a number larger than the max for a 32-bit integer. I don't think it's code-based as the problem is also encountered when using the Salesforce ...
user avatar
11 votes
1 answer
2k views

Converting between .NET decimal and SFDC decimal

We have a .NET app that interfaces with SFDC via a web service. When we import the WSDL the resulting classes will use the .NET type double wherever SFDC entities use a double. The problem I see here ...
user avatar
  • 1,049
7 votes
1 answer
2k views

What is max and min range for double.valueOf()?

what is max and min range for double.valueOf() in apex.
user avatar