I'm attempting to check for a value via a lookup field, and if the value is the value I am looking for, make another field on the form required.
The second part is no problem, it's the checking to see if a specific value for the lookup was selected.
I'm using dynamics crm 2011 on premise and I've done a lot of research, finding a lot of different code, I either get an error or when I input an alert I get prompt saying [object Object] from the code below.. Please help!
function namelocationrequired() {
var lookup = Xrm.Page.getAttribute("new_csiapprovedtradeshows").getValue();
/*
if (lookup != null) {
var name = lookup[0].name;
var id = lookup[0].id;
var entityType = lookup[0].entityType;
alert(name);
alert(id);
alert(entityType);
}
*/
alert(lookup);
}
*This post is locked for comments
I have the same question (0)