admin管理员组文章数量:1392054
If it does not have a value do one thing, else do something else. See my code below. This is currently not working. I'm pretty sure my if statement is incorrect but unsure how to fix
if(new_steponecontractrecieved)
{
Xrm.Page.getAttribute("new_totalamountcollected").setValue(item2);
} else
{
Xrm.Page.getAttribute("new_totalamountcollected").setValue(item1+item2);
}
If it does not have a value do one thing, else do something else. See my code below. This is currently not working. I'm pretty sure my if statement is incorrect but unsure how to fix
if(new_steponecontractrecieved)
{
Xrm.Page.getAttribute("new_totalamountcollected").setValue(item2);
} else
{
Xrm.Page.getAttribute("new_totalamountcollected").setValue(item1+item2);
}
Share
Improve this question
edited Mar 31, 2016 at 17:14
BMergen
asked Mar 31, 2016 at 14:54
BMergenBMergen
151 silver badge3 bronze badges
1 Answer
Reset to default 5Please try the code below:
var new_steponecontractrecieved= Xrm.Page.getAttribute("new_steponecontractrecieved");
if(new_steponecontractrecieved!=null && new_steponecontractrecieved.getValue()!=null)
{
//have a value do one thing
}
else if(new_steponecontractrecieved!=null)
{
//does not have a value do other thing
}
本文标签: dynamics crm 2011javascript to check if a field has a valueStack Overflow
版权声明:本文标题:dynamics crm 2011 - javascript to check if a field has a value - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744780568a2624685.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论