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

retrieve look up record name

$
0
0

i want to retrieve lookup record name if another field value change 

here is my scenario i have a look up field called candidate and another field name sendemail two option field yes\no when user click on sendemail a message will pop uo with the candidate name id nad other look up info \here is what i have found and right 

function getLookupDetails() {
var lookupObj = Xrm.Page.getAttribute(ant_candidate); //Check for Lookup Object
if (lookupObj != null) {
var lookupObjValue = lookupObj.getValue();//Check for Lookup Value
if (lookupObjValue != null) {
var lookupEntityType = lookupObjValue[0].entityType, //To get EntityName
lookupRecordGuid = lookupObjValue[0].id, // To get record GUID
lookupRecordName = lookupObjValue[0].name; //To get record Name

if (lookupEntityType != null && lookupRecordGuid != null && lookupRecordName != null) {
Xrm.Utility.alertDialog("Entity Type : " + lookupEntityType + "\nRecord GUID : " + lookupRecordGuid + "\nRecord Name : " + lookupRecordName, null);
}
}
}
}

i got an error here is the error ReferenceError: getLookupDetails

please help Best Regards .


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>