Get / Set Lookup field value using javascript in CRM

Get / Set Lookup field value using javascript in CRM : Get Lookup Field Value : function getLookupDetails() {     try {         var lookupentityName, lookuprecordId, lookuprecordname, lookupFieldObject;         lookupFieldObject = Xrm.Page.getattribute("gb_lookupfieldschemaname");         if (lookupFieldObject != null && lookupFieldObject.getValue() != null) {             lookuprecordId = lookupFieldObject.getValue()[0].id;             lookupentityName = lookupFieldObject.getValue()[0].entityType;             lookuprecordname = lookupFieldObject.getValue()[0].name;         }     }     catch (ex) {         alert(" Exception in … Continue reading Get / Set Lookup field value using javascript in CRM