parseFloat() 函数解析一个参数和 returns 一个浮点数,但在使用它之后与我一起检索 Nan
parseFloat() function parses an argument and returns a floating point number but with me after using it Retrieve Nan
在我的表单中有(CRM
中的整数字段)和 JavaScript 中检索值我使用 ParseFloat
函数但检索到我 NaN
但我想要像 (12.00) 那样检索。
function SetLookup(fieldName, Id, Name, LogicalName)
{
var value = new Array();
value[0] = new Object();
value[0].id = Id;
value[0].name = Name;
value[0].typename = LogicalName;
var getAttribute = Xrm.Page.getAttribute(fieldName);
if (getAttribute != null) {
getAttribute.setValue(parseFloat(value));
getAttribute.setSubmitMode("always");
}
}
parseFloat() 需要一个字符串输入。
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseFloat
但是您的代码试图向它传递一个对象数组。
在我的表单中有(CRM
中的整数字段)和 JavaScript 中检索值我使用 ParseFloat
函数但检索到我 NaN
但我想要像 (12.00) 那样检索。
function SetLookup(fieldName, Id, Name, LogicalName)
{
var value = new Array();
value[0] = new Object();
value[0].id = Id;
value[0].name = Name;
value[0].typename = LogicalName;
var getAttribute = Xrm.Page.getAttribute(fieldName);
if (getAttribute != null) {
getAttribute.setValue(parseFloat(value));
getAttribute.setSubmitMode("always");
}
}
parseFloat() 需要一个字符串输入。 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseFloat
但是您的代码试图向它传递一个对象数组。