In SageCRM, Table level script can be used for replicating SQL trigger like functionality. Table level scripts help us handle the data update events properly and do corresponding actions within SageCRM. The beauty of it is we can use SageCRM API and write server side JavaScript like functionality to function similar to that of triggers.
New Stuff: Hide Tracking Note field while progressing workflow
When we write code in JavaScript, we tend to make small errors and forget to catch them properly. SageCRM table level script captures these errors and displays them in log file. We can view these logs by using “Show log” buttons under Table script configurations as displayed in below screenshot.
The errors get logged when we keep “Logging Level” field as Low, Medium or High while creating Table level script. Below are the options available in “Logging Level” field.
Off : Logging switched off. No entry in Log table.
Low : Low level diagnostic information in Log table.
Medium : Medium level diagnostic information in Log table.
High : High level diagnostic information in Log table.
Keeping logging level as Low, Medium or High is a good idea to track the logs in table level scripts while developing customization’s on Development Environment.
What about Client Environment? If we keep these options on Client Environment, it will keep on logging unnecessary entries of erroneous scripts in log file. These logs are stored in Tablescriptslogs table. As unwanted entries go in with every transaction, it increases size of Tablescriptslogs table and subsequently size of the database grows. To avoid this scenario we have to keep “Logging level” field as “Off”on client Environment and make sure to address all errors before deployment on.
If you find your database size growing without any reasons, do make sure to check the size of TableScriptsLogs table in case you have implemented Table Level Scripts.
Related Posts: