{"id":5370,"date":"2013-11-05T10:44:10","date_gmt":"2013-11-05T10:44:10","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/?p=5370"},"modified":"2013-11-05T10:44:10","modified_gmt":"2013-11-05T10:44:10","slug":"new-way-client-side-field-customizations","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/11\/05\/new-way-client-side-field-customizations\/","title":{"rendered":"New way of Client side field customizations"},"content":{"rendered":"<p>SageCRM has always been open for good lot of client side customizations for the fields added on several blocks like Lists, Screens etc. When it comes to client side screen customization one thing that comes to our mind is the EntryForm and so is the old way of referring field objects.<br \/>\n<span style=\"color: #3366ff;\"><i>var\u00a0 oField = document.EntryForm.&lt;field name &gt;<\/i><\/span><br \/>\nNow as we had the field object we used to write whole lot of complex functions in order to do simple customizations like Hiding and Showing fields like the one explained in my blog below.<br \/>\n<b><span style=\"color: #993300;\">Related Post\u00a0<\/span>:\u00a0<\/b><a title=\"Hide and Show fields in SageCRM\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/06\/28\/hide-and-show-fields-in-sagecrm\/\" target=\"_blank\">Hide and Show fields in SageCRM<\/a><br \/>\nNow with the introduction of new client side API these things have become fairly simple. You have got the CRM fields collection to get field objects and you can utilize power of jQuery to do complex client side scripting for all your needs.<br \/>\nHere is the script which does the same thing explained in above blog post but using new client side API.<br \/>\n<span style=\"color: #3366ff;\"><i>&lt;script&gt;<\/i><\/span><br \/>\n<span style=\"color: #3366ff;\"><i>\/\/&#8217;Call to onlaod event<\/i><\/span><br \/>\n<span style=\"color: #3366ff;\"><i>window.attachEvent(&#8220;onload&#8221;,Page_OnLoad);<\/i><\/span><br \/>\n<span style=\"color: #3366ff;\"><i>\u00a0<\/i><i>\/\/&#8217;Onlaod event definition<\/i><\/span><br \/>\n<span style=\"color: #3366ff;\"><i>function Page_OnLoad()<\/i><\/span><br \/>\n<span style=\"color: #3366ff;\"><i>{<\/i><\/span><br \/>\n<span style=\"color: #3366ff;\"><i>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/&#8217;Hide field <\/i><\/span><br \/>\n<span style=\"color: #3366ff;\"><i>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0crm.fields(&#8220;oppo_description&#8221;).hide();<\/i><\/span><br \/>\n<span style=\"color: #3366ff;\"><i>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/i><i>\/\/&#8217;Show it<\/i><\/span><br \/>\n<span style=\"color: #3366ff;\"><i>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0crm.fields(&#8220;oppo_description&#8221;).show();<\/i><\/span><br \/>\n<span style=\"color: #3366ff;\"><i>}<\/i><\/span><br \/>\n<span style=\"color: #3366ff;\"><i>&lt;\/script&gt;<\/i><\/span><br \/>\nI think there is no need of explaining that this has to be put on the Custom Content section of Opportunity Summary Screen.<br \/>\nOne more thing every reader should keep in mind while hiding any field on screen is, the field you are hiding should not be mandatory. Otherwise you will get validation error and won\u2019t even know what is it :).<br \/>\nHappy scripting!<br \/>\n<span style=\"color: #000000;\"><strong><span style=\"color: #993300;\">Also Read:<\/span><br \/>\n<\/strong><\/span>1) <a title=\"How to remove Arrow button of Search Select Advanced field\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2012\/10\/06\/how-to-remove-arrow-button-of-search-select-advanced-field\/\" target=\"_blank\">How to remove Arrow button of Search Select Advanced field<br \/>\n<\/a>2) <a title=\"Add custom button using Access Key in Sage CRM\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2012\/05\/16\/add-custom-button-using-access-key-in-sage-crm\/\" target=\"_blank\">Add custom button using Access Key in Sage CRM<br \/>\n<\/a>3) <a title=\"Remove hyperlink from summary caption tags\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2012\/02\/13\/remove-hyperlink-from-summary-caption-tags\/\" target=\"_blank\">Remove hyperlink from summary caption tags<br \/>\n<\/a>4) <a title=\"Error while writing scripts on OnChange script section\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2012\/01\/25\/error-while-writing-scripts-on-onchange-script-section\/\" target=\"_blank\">Error while writing scripts on OnChange script section<br \/>\n<\/a>5) <a title=\"Javascript popup window\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/06\/17\/javascript-popup-window\/\" target=\"_blank\">Javascript popup window<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SageCRM has always been open for good lot of client side customizations for the fields added on several blocks like Lists, Screens etc. When it comes to client side screen customization one thing that comes to our mind is the EntryForm and so is the old way of referring field objects. var\u00a0 oField = document.EntryForm.&lt;field\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/11\/05\/new-way-client-side-field-customizations\/\">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":[200,332],"tags":[684,793,1468],"class_list":["post-5370","post","type-post","status-publish","format-standard","hentry","category-javascript-sage-crm","category-sage-crm","tag-client-side","tag-crm","tag-java-script"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>New way of Client side field customizations - 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\/2013\/11\/05\/new-way-client-side-field-customizations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New way of Client side field customizations - Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"og:description\" content=\"SageCRM has always been open for good lot of client side customizations for the fields added on several blocks like Lists, Screens etc. When it comes to client side screen customization one thing that comes to our mind is the EntryForm and so is the old way of referring field objects. var\u00a0 oField = document.EntryForm.&lt;field\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/11\/05\/new-way-client-side-field-customizations\/\" \/>\n<meta property=\"og:site_name\" content=\"Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2013-11-05T10:44:10+00:00\" \/>\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\/2013\/11\/05\/new-way-client-side-field-customizations\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/11\/05\/new-way-client-side-field-customizations\/\",\"name\":\"New way of Client side field customizations - Sage CRM \u2013 Tips, Tricks and Components\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website\"},\"datePublished\":\"2013-11-05T10:44:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/11\/05\/new-way-client-side-field-customizations\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/11\/05\/new-way-client-side-field-customizations\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/11\/05\/new-way-client-side-field-customizations\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"New way of Client side field customizations\"}]},{\"@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":"New way of Client side field customizations - 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\/2013\/11\/05\/new-way-client-side-field-customizations\/","og_locale":"en_US","og_type":"article","og_title":"New way of Client side field customizations - Sage CRM \u2013 Tips, Tricks and Components","og_description":"SageCRM has always been open for good lot of client side customizations for the fields added on several blocks like Lists, Screens etc. When it comes to client side screen customization one thing that comes to our mind is the EntryForm and so is the old way of referring field objects. var\u00a0 oField = document.EntryForm.&lt;field\u2026 Read More &raquo;","og_url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/11\/05\/new-way-client-side-field-customizations\/","og_site_name":"Sage CRM \u2013 Tips, Tricks and Components","article_published_time":"2013-11-05T10:44:10+00:00","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\/2013\/11\/05\/new-way-client-side-field-customizations\/","url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/11\/05\/new-way-client-side-field-customizations\/","name":"New way of Client side field customizations - Sage CRM \u2013 Tips, Tricks and Components","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website"},"datePublished":"2013-11-05T10:44:10+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f"},"breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/11\/05\/new-way-client-side-field-customizations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/11\/05\/new-way-client-side-field-customizations\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/11\/05\/new-way-client-side-field-customizations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/"},{"@type":"ListItem","position":2,"name":"New way of Client side field customizations"}]},{"@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\/5370","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=5370"}],"version-history":[{"count":0,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/5370\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/media?parent=5370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/categories?post=5370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/tags?post=5370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}