Changes

Jump to: navigation, search

Making Company Standard Fields Mandatory

338 bytes added, 17:44, 22 August 2018
no edit summary
To make company standard fields mandatory, you must create a custom field of type # Go to the [[Custom Field Type: Special – Browser ScriptContact and Account Standard Fields|Company Standard Fields]] and place it on settings page from the same entity that you'll be using it[[Global Settings]] page. For companies, (Global Settings--Organizations--Standard Fields)# Select the standard field you'll want to put make mandatory.# Check off the custom field in via Global Settings > Branch & Account Settings > Account Custom Fields"Mandatory" checkbox.# Hit Save.
<pre>----function additionalCheckingOnSubmit(){ var frm=document-''Alternate Method:'' Create a custom field of type [[Custom Field Type: Special – Browser Script]] and place it on the same entity that you'll be using it.frmcompany; var element=frm.address; if(elementFor companies, you'll want to put the custom field in via [[Global Settings]] > [[Branch &Account Settings|Branch &element.value.length==0){ alert("Address is empty!"); return false; } element=frm.phone; if(element&&element.value.length==0){ alert("Phone is empty!"); return false; } element=frm.city; if(element&&element.value.length==0){ alert("City is empty!"); return false; } element=frm.country; if(element&&(element.value.length==0||element.value=="0")){ alert("Country is empty!"); return false; } return true;}Account Settings]] > Account Custom Fields
<pre>function savefunc(frm){ var element=frm.address; if(element&&element.value.length==0){ alert("Address is empty!"); return additionalCheckingOnSubmitfalse; }element=frm.phone; if(element&&element.value.length==0){ alert("Phone is empty!"); return false; }element=frm.city; if(element&&element.value.length==0){ alert("City is empty!"); return false; }element=frm.country; if(element&&(element.value.length==0||element.value=="0")){ alert("Country is empty!"); return false; }return true;}</pre> ==See Also==* [[Contact_and_Account_Standard_Fields#Mandatory|Contact and Account Standard Fields]]* [[Making Contact Standard Fields Mandatory]]* [[Making Company Mandatory for Contact Records]]
[[Category: Custom Fields]][[Category:JavaScript]]
Smartstaff, administrator
421
edits

Navigation menu