{"id":8190,"date":"2014-07-05T06:05:08","date_gmt":"2014-07-05T06:05:08","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/?p=8190"},"modified":"2014-07-05T06:05:08","modified_gmt":"2014-07-05T06:05:08","slug":"table-level-scripts-logging-and-performance","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/","title":{"rendered":"Table Level Scripts Logging and Performance"},"content":{"rendered":"<p>In SageCRM, Table level script can be used for replicating SQL trigger like functionality. \u00a0Table 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.<br \/>\n<em><span style=\"color: #800000;\"><b>New Stuff<\/b>:<\/span><\/em>\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/03\/hide-tracking-note-field-while-progressing-workflow\/\" target=\"_blank\">Hide Tracking Note field while progressing workflow<\/a><br \/>\nWhen 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. \u00a0We can view these logs by using <strong>\u201cShow log\u201d<\/strong> buttons under Table script configurations as displayed in below screenshot.<br \/>\n<a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/07\/Showlog.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-8191\" alt=\"Showlog\" src=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/07\/Showlog.jpg\" width=\"882\" height=\"463\" \/><\/a><br \/>\nThe errors get logged when we keep <strong>\u201cLogging Level\u201d<\/strong> field as <strong>Low<\/strong>, <strong>Medium<\/strong> or <strong>High<\/strong> while creating Table level script. Below are the options available in <strong>\u201cLogging Level\u201d<\/strong> field.<br \/>\n<strong>Off \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/strong>\u00a0 \u00a0 : Logging switched off. No entry in Log table.<br \/>\n<strong>Low<\/strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0: Low level diagnostic information in Log table.<br \/>\n<strong>Medium \u00a0 \u00a0<\/strong>\u00a0 \u00a0 : Medium level diagnostic information in Log table.<br \/>\n<strong>High \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/strong>: High level diagnostic information in Log table.<br \/>\nKeeping logging level as <strong>Low<\/strong>, <strong>Medium<\/strong> or <strong>High<\/strong> is a good idea to track the logs in table level scripts while developing customization&#8217;s on Development Environment.<br \/>\nWhat 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 <strong>Tablescriptslogs<\/strong> table. As unwanted entries go in with every transaction, it increases size of <strong>Tablescriptslogs<\/strong> table and subsequently size of the database grows. To avoid this scenario we have to keep<strong> \u201cLogging level\u201d<\/strong> field as <strong>\u201cOff&#8221;<\/strong>on client Environment and make sure to address all errors before deployment on.<br \/>\nIf 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.<br \/>\n<span style=\"color: #800000;\"><em><strong>Related Posts:<\/strong><\/em><\/span><\/p>\n<ol>\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2011\/08\/02\/table-level-scripts\/\" target=\"_blank\">Table Level Scripts<\/a><\/li>\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2009\/07\/06\/writing-table-level-script-is-a-hectic-job-try-this-instead\/\" target=\"_blank\">Writing Table Level Script is a hectic job ? \u2013 Try this instead\u2026<\/a><\/li>\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2009\/06\/21\/some-guidelines-to-avoide-time-out-errors-caused-by-table-level-scripts\/\" target=\"_blank\">Some guidelines to avoide Time out errors caused by Table Level Scripts<\/a><\/li>\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2009\/04\/01\/timeout-error-in-table-level-script\/\" target=\"_blank\">Timeout Error in table level script<\/a><\/li>\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/06\/26\/sage-crm-database-maintenance\/\" target=\"_blank\">Sage CRM Database Maintenance<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>In SageCRM, Table level script can be used for replicating SQL trigger like functionality. \u00a0Table 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.\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,58,73,102,332,393],"tags":[921,1471,1543,2047,2337,2403,2406,2450],"class_list":["post-8190","post","type-post","status-publish","format-standard","hentry","category-administrator","category-cleanup","category-configuration","category-database-sage-crm","category-sage-crm","category-tables","tag-database","tag-javascript","tag-logging-level","tag-sage-crm-api","tag-sql-triggers","tag-table-level-script","tag-tablescriptslogs","tag-tls"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Table Level Scripts Logging and Performance - Sage CRM \u2013 Tips, Tricks and Components<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Table Level Scripts Logging and Performance - Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"og:description\" content=\"In SageCRM, Table level script can be used for replicating SQL trigger like functionality. \u00a0Table 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.\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/\" \/>\n<meta property=\"og:site_name\" content=\"Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2014-07-05T06:05:08+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/07\/Showlog.jpg\" \/>\n<meta name=\"author\" content=\"greysagecrm\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"greysagecrm\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/\",\"name\":\"Table Level Scripts Logging and Performance - Sage CRM \u2013 Tips, Tricks and Components\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/07\/Showlog.jpg\",\"datePublished\":\"2014-07-05T06:05:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/#primaryimage\",\"url\":\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/07\/Showlog.jpg\",\"contentUrl\":\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/07\/Showlog.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Table Level Scripts Logging and Performance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/\",\"name\":\"Sage CRM \u2013 Tips, Tricks and Components\",\"description\":\"Explore the possibilities with Sage CRM insights through our comprehensive blogs. As a leading Sage partner, Greytrix helps businesses maximize their Sage CRM potential with its rich expertise and immense knowledge. Here, you will find blogs that feature expert advice, tips &amp; tricks, best practices, and comprehensive guides on customizing and configuring Sage CRM for your business. Stay informed with our regular updates and expert insights!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f\",\"name\":\"greysagecrm\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"caption\":\"greysagecrm\"},\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/author\/greysagecrm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Table Level Scripts Logging and Performance - Sage CRM \u2013 Tips, Tricks and Components","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/","og_locale":"en_US","og_type":"article","og_title":"Table Level Scripts Logging and Performance - Sage CRM \u2013 Tips, Tricks and Components","og_description":"In SageCRM, Table level script can be used for replicating SQL trigger like functionality. \u00a0Table 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.\u2026 Read More &raquo;","og_url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/","og_site_name":"Sage CRM \u2013 Tips, Tricks and Components","article_published_time":"2014-07-05T06:05:08+00:00","og_image":[{"url":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/07\/Showlog.jpg","type":"","width":"","height":""}],"author":"greysagecrm","twitter_card":"summary_large_image","twitter_misc":{"Written by":"greysagecrm","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/","url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/","name":"Table Level Scripts Logging and Performance - Sage CRM \u2013 Tips, Tricks and Components","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/#primaryimage"},"image":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/#primaryimage"},"thumbnailUrl":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/07\/Showlog.jpg","datePublished":"2014-07-05T06:05:08+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f"},"breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/#primaryimage","url":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/07\/Showlog.jpg","contentUrl":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/07\/Showlog.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/05\/table-level-scripts-logging-and-performance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/"},{"@type":"ListItem","position":2,"name":"Table Level Scripts Logging and Performance"}]},{"@type":"WebSite","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website","url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/","name":"Sage CRM \u2013 Tips, Tricks and Components","description":"Explore the possibilities with Sage CRM insights through our comprehensive blogs. As a leading Sage partner, Greytrix helps businesses maximize their Sage CRM potential with its rich expertise and immense knowledge. Here, you will find blogs that feature expert advice, tips &amp; tricks, best practices, and comprehensive guides on customizing and configuring Sage CRM for your business. Stay informed with our regular updates and expert insights!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f","name":"greysagecrm","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","caption":"greysagecrm"},"url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/author\/greysagecrm\/"}]}},"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/8190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/comments?post=8190"}],"version-history":[{"count":0,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/8190\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/media?parent=8190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/categories?post=8190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/tags?post=8190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}