Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<html><head><title>onCreateExample1</title><script type="text/javascript"> 
function fieldsOnDefault(){ return "CONTPHONE01,CONTFAX01"; }
function getDefaultValueOfCONTPHONE01(){ return "2.ACCTPHONE01" } 
function getDefaultValueOfCONTFAX01(){ return "2.ACCTFAX01" }
</script></head><body></Body><body></html> 


where:

  • fieldsOnDefault() { return "MEFIELDNAME"; } defines the fields to be set. To set the value in the two fields (CONTPHONE01 and CONTFAX01) within the contact, the MEFIELDNAME is replaced with these two values and separated by a comma in onCreate example 1 as follows:
Code Block
function fieldsOnDefault() { return "CONTPHONE01, CONTFAX01"; }
  • function getDefaultValueOfMEFIELDNAME(){ return "MODULEID.MEFIELDNAME" } sets each field. It lists the field to be set in the getDefaultValueOf command and the value to insert (return) from the parent by listing the module ID and field name of the parent field. This is done one field at a time in onCreate example 1 as follows:

Code Block
function getDefaultValueOfCONTPHONE01(){ return "2.ACCTPHONE01" } 
function getDefaultValueOfCONTFAX01(){ return "2.ACCTFAX01" } 

...