나는 당신에 의해 비교를 사용하고자하는 경우 난 그냥
http://msdn.microsoft.com/en-us/library/cc189833.aspx
를 참조하고 코드의 내 자신의 버전을했다 "VAR"
if(crmForm.all.<lookupfield>.DataValue != null){
var partnername = crmForm.all.<lookupfield>.DataValue[0].id;
// alert(partnername); // used to find out the LookUp ID number
// Exampled Result: "{AEB4E2EF-C2E9-DE11-B076-000E0F0000E0}"
if(partnername == "{AEB4E2EF-C2E9-DE11-B076-000E0F0000E0}"){
crmForm.all.new_paymentterms.DataValue = 60;
crmForm.all.new_paymentterms.Disabled = true; // used
// alert("This Account has a default payment terms of 60 days.")
}
}
else{crmForm.all.<lookupfield>.DataValue == null
crmForm.all.new_paymentterms.Disabled = false;
}
를 사용하거나 알아 낸 조회 필드의 실제 텍스트
if(crmForm.all.<lookupfield>.DataValue != null){
var partnername = crmForm.all.<lookupfield>.DataValue[0].name;
// alert(partnername); // used to find out the LookUp ID number
// Exampled Result: "Company X"
if(partnername == "Company X"){
crmForm.all.<lookupfield>.DataValue = 60;
crmForm.all.<lookupfield>.Disabled = true; // used
// alert("This Account " + partnername
+ '\n' + '\n' + " has a default payment terms of 60 days.")
}
}
else{crmForm.all.<lookupfield>.DataValue == null
crmForm.all.new_paymentterms.Disabled = false;
}
삭제 : 코드 b 노역
try{
if(crmForm.all.<lookupfield>.DataValue != null){
var partnername = crmForm.all.<lookupfield>.DataValue[0].name;
if(partnername == "Company X"){
// Insert your code here
}
}
else{
//Optional Code here if you want the nothing then insert nothing here
}
}
catch(err){alert("Error in pulling the Lookup Field Name")}
솔루션을 공유해 주셔서 감사합니다. –