Hi,
I can't get a simple javascript alert to work. I have verified that the function in which I put the alert is running fine (it's setting a value in a text field and I can change it and see correct results).
Is there something I am missing here? It's not working in IE11 nor Chrome (latest update).
This is what it looks like:
setTemporaryName: function () {
alert("temp name");
//get the name (primary field) of the Action
var name = Xrm.Page.getAttribute("custom_name").getValue();
if (!name || 0 === name.length) {
Xrm.Page.getAttribute("custom_name").setValue('TEMP');
} else {
}
},
The text field is set to "TEMP" (or whatever I change it to) but the alert simply is not popping up. Tried on different computers and different laptops.