Versions Compared

Key

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

...

Code Block
<html><head><title>PreSaveExample1</title><script type="text/javascript"> 
function fieldsOnPreSave(){ return "TASKDT01,TASKDT02"; }
function onPreSave(due,planned){ 
	if( due > planned ) {
		return true; 
	}else{ 
		window.location = "melt://showAlert/$due.greater.than.planned"; 
		return false; 
	}
}
</script></head><body></Body><body></html> 


The complete code for onPreSave example 3 with header and footer information is as follows:

Code Block
<html><head><title>PreSaveExample3</title><script type="text/javascript"> function fieldsOnPreSave(){ return "CUSTTXT07,2.ACCTKW05" }
function onPreSave(discount,custtype){ 
	if(discount==0 || custtype=='Preferred'){
		return true; 
	}else{ 
		window.location = "melt://showAlert/You can only enter a discount for Preferred customers"; 
		return false; 
	}
}
</script></head><body></Body><body></html> 



For onPreSave example 3, the following changes are made to onPreSave example 1 code:

...