Making Company Mandatory for Contact Records

From SmartWiki
Revision as of 17:48, 5 May 2011 by Cameron (talk | contribs) (Created page with ' To make selecting the Company when creating or editing contacts you must create a custom field of type Custom Field Type: Special – Browser Script and place it on a custo…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


To make selecting the Company when creating or editing contacts you must create a custom field of type Custom Field Type: Special – Browser Script and place it on a custom field in via Global Settings > User & Contact Settings > Contact Custom Fields. (Terminology may be different in your copy of SmartSimple)


function savefunc(frm)

  var element=frm.companyid;
  if((element&&frm.companytxt) && frm.companytxt.style.display!="none" && !frm.companytxt.readonly &&(element.value.length==0||element.value==0)){
     alert("You must select the Organisation for this contact before saving.");
     return false;
  }

}