This little tip shows how you can use a Table Level Script to set a value for a field that is not displayed on the screen.
In my example a customer needed to implement a business rule that when a user updates the company field 'Type' to be a Customer the system should then automatically updated a date field (comp_customerstartdate).
It may seem to be a catch that the date field is not displayed on the company screen. But this is something that can be easily handled by a Table Level script
You could you this code in an UpdateRecord event function
E.g.
function UpdateRecord() { // Handle update record actions here var strOldType = CRM.GetContextInfo("company","comp_type"); var strNewType = Values("comp_type") if (strOldType != strNewType & & strNewType=="Customer") { var mydate = new Date(); mydate.setDate(mydate.getDate() +7); Values("comp_customerstartdate") = mydate.getVarDate(); } }