There is a problem when checking attributes value, after the user clicks on ribbon button without losing focus of the attribute.
Description:
1) I've register the ribbon button event to something like:
if(Xrm.Page.getAttribute("new_test").getValue() != null)
{
alert("aaaaa");
}
}
2) User clicks the ribbon button when the attribute is empty
3) Get's alert
4) User insert text to the attribute and clicks again
5) Get's alert
After changing the code to the old (CRM 4) javascript syntact:
if(crmForm.all.new_test.DataValue != null)
{
alert("AAAA");
}
Everything worked great! Even when the focus still on the textbox.
This is a workaround.
This is a workaround.
thx but that's not supported by Microsoft to use a deprecated API
ReplyDeleteYep you are right...
DeleteEvent tried it yet but another option would be set focus on some other control before getting the value from that control...
GOOD ARTICLE,CLICK HERE
ReplyDelete