When I create an order from a contact I want the account of the contact on the regarding field and not the contact. Because of that I created a code in the onload event which works very well. if ( (window.opener != null) && (window.opener.parent != null) && (window.opener.parent.document != null) && (window.opener.parent.document.crmForm != null)) {
var parentForm = window.opener.parent.document.crmForm;
if (parentForm.ObjectTypeName == "contact")
{ if (parentForm.parentcustomerid.DataValue != null) {
var newIdArray;
newIdArray = parentForm.parentcustomerid.DataValue;
crmForm.all.customerid.DataValue = newIdArray;
//crmForm.all.from.DataValue = newIdArray;
}
} } The problem appears when I have created a quote and try to convert it to an order. The following warningerror appears. (I have done my best to translate it from Norwegian)
"It appeard an error with the customized event for this field. Field: Window Event: Onload Error: The server (not the serverprogram) is not available and is gone. The connections is not guilty. The event has not been made." After that you click ok and it works ok. Does anyone know why this warningmessage appear?
Thanks, Martin