//如果從父表單開啟,則可以取到父表單的值
if (
(window.opener != null) &&
(window.opener.parent != null) &&
(window.opener.parent.document != null) &&
(window.opener.parent.document.crmForm != null)) {
//This is the parent form
var parentForm = window.opener.parent.document.crmForm;
var xx= parentForm.all.{FieldName}.DataValue ;
}