Using generic JavaScript in field level scripting
You use the normal JavaScript syntax in the Sage CRM Field Level Scripting environment. The only difference is that you do not need to include the scripting <script></script> or <% %> tags. You can use JavaScript server-side scripts and client-side scripts.
There is no limit to the size of the script that you can enter in the Create, Validate and OnChange fields, although for larger scripts it may be easier to include the script in an ASP page in the ..WWWRoot\CustomPages folder of the Sage CRM install. For more information, see the Developer Help on the Sage CRM Help Center.