Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

running Java Script notification when text field is blank

$
0
0

I have a single line text field

I am trying to get a notification at the top of the form to say that the field is blank, if there is data in the field then i want the notification to disappear

I just cant get my code below to work, i keep getting an error




function setDocumentNotification() {
var ref_field = Xrm.Page.getAttribute("new_reference").getValue();
if(ref_field == "") {
Xrm.Page.ui.setFormNotification("Reference field is blank", "INFO");
}
else {
Xrm.Page.ui.clearFormNotification();
}
}

Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images