Dynamics CRM forms: jScript for a dummy
Breaking my head against more compex problems, I try to get back to basics.
I want to have a jScript in a form, that upon user change i开发者_C百科n control Sub-Fund, will pop up a message showing the new value of that control. Here is my code -- which returns an error, of course 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 What'wrong ?Try this :
function TestForDummy()
{
var lookupValue = Xrm.Page.getAttribute("new_subfundid").getValue();
var noind = lookupValue[0].id;
alert(noind);
}
精彩评论