You need to sign in to do that
Don't have an account?
bz880
AJAX toolkit not bringing back 0.00
Hi there,
I was trying to update some opportunity line item fields with a value of 0.00. This works no problem through the standard SalesForce edit screen. However, when this opportunity is retrieved through the AJAX API, no values are being returned to me.
Has anyone else dealt with something like that?
Thanks
Baldwin
I was trying to update some opportunity line item fields with a value of 0.00. This works no problem through the standard SalesForce edit screen. However, when this opportunity is retrieved through the AJAX API, no values are being returned to me.
Has anyone else dealt with something like that?
Thanks
Baldwin
do you get back a "null" , an error or what ?
is there a queryResult with the size you expected, but no amount ?
did you use queryResult.results[0].get("Amount") ? or queryResult.results[0].Amount ?
I am simply doing an sforce query like such:
var lineItem = sforceClient.Query("Select foo from OpportunityLineItem");
Then to retrieve a value, I call
lineItem.records[0].get("foo");
When I do an alert of foo, it is an empty string.
Does this make it clearer?
thanks
will file a bug.
Is the SOAP response contain an nill, or empty element, or is the AJAX toolkit simply not parsing it correctly?
Thanks
if you ask for the Amount to be returned, and you get back a valid query response but the amount is not set ( try , == undefined or == null )
then the amount was 0.00$
i believe the problem is that a number 0 cast to a string is "" which is not set into the AJAX return object.
var _value = value || "";
Javascript does not evaluate a float of 0 as valid. So the "" is satisfied. I went with a workaround like this:
if(value == null)
_value = "";
Baldwin