简体   繁体   English

Dynamics CRM表单:用于虚拟对象的jScript

[英]Dynamics CRM forms: jScript for a dummy

Breaking my head against more compex problems, I try to get back to basics. 为了避免遇到更多的Compex问题,我尝试恢复基础知识。
I want to have a jScript in a form, that upon user change in control Sub-Fund, will pop up a message showing the new value of that control. 我想要一个jScript形式,当用户更改控件Sub-Fund时,将弹出一条消息,显示该控件的新值。
Here is my code -- which returns an error, of course 8-((( 这是我的代码-当然会返回错误8-(((

function TestForDummy()
{
   var noind = crmForm.all.new_subfundid.DataValue;
   alert(noind);
}

Whenever I update Sub-Fund, it gives me an error 每当我更新子基金时,都会给我一个错误
Field:new_subfundid, Event:onchange, Error:Object expected 字段:new_subfundid,事件:onchange,错误:预期对象
What'wrong ? 怎么了

Try this : 尝试这个 :

function TestForDummy() 
{ 
    var lookupValue = Xrm.Page.getAttribute("new_subfundid").getValue();   
    var noind = lookupValue[0].id;
    alert(noind); 
} 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM