{"id":132,"date":"2019-08-25T07:32:45","date_gmt":"2019-08-25T07:32:45","guid":{"rendered":"https:\/\/www.techcrm.in\/blogs\/?p=132"},"modified":"2020-09-08T14:55:35","modified_gmt":"2020-09-08T09:25:35","slug":"extending-customize-list-view","status":"publish","type":"post","link":"https:\/\/www.techcrm.in\/blogs\/extending-customize-list-view\/","title":{"rendered":"Extending\/Customize List View"},"content":{"rendered":"\n<p>Today We came across a forum question which asked to hide &#8220;Closed Lost&#8221; opportunities from list view.<\/p>\n\n\n\n<p>Simple steps and you are through! <\/p>\n\n\n\n<p><strong>Step 1<\/strong>: Create or edit custom\/modules\/Opportunities\/views\/view.list.php and add following code, <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\nrequire_once('include\/MVC\/View\/views\/view.list.php');\n\nclass OpportunitiesViewList extends ViewList {\n\n    function listViewProcess() {\n        global $current_user;\n        $this->processSearchForm();\n        if(!$current_user->is_admin) \/\/ remove this condition if you dont want admin user to view the \"Closed Lost\" Opportunities.\n            $this->params['custom_where'] = ' AND opportunities.sales_stage &lt;> \"Closed Lost\" ';\n       \n        if (empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false) {\n            $this->lv->setup($this->seed, 'include\/ListView\/ListViewGeneric.tpl', $this->where, $this->params);\n            $savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);\n            echo $this->lv->display();\n        }\n    }\n\n}<\/code><\/pre>\n\n\n\n<p><strong>Step 2<\/strong>: Refresh list view! <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Note :<\/strong><\/p><cite> P.S. Possible customizations in the query are:<br>> custom_select\u00a0<br>> custom_from\u00a0<br>> custom_where\u00a0<br>> custom_order_by<br>Order by will be considered as second order by field when user clicks on other field to sort records. <\/cite><\/blockquote>\n\n\n\n<p>Hope this helps and feels like missing piece is just found!<\/p>\n\n\n\n<p>Feel free to drop your comments.<\/p>\n\n\n\n<p>Your valuable feedback means a lot.<\/p>\n\n\n\n<p>You can contact us at&nbsp;<a rel=\"noreferrer noopener\" href=\"mailto:contact@urdhva-tech.com\" target=\"_blank\">info@techcrm.in<\/a><\/p>\n\n\n\n<p>Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today We came across a forum question which asked to hide &#8220;Closed Lost&#8221; opportunities from list view. Simple steps and you are through! Step 1: Create or edit custom\/modules\/Opportunities\/views\/view.list.php and add following code, Step 2: Refresh list view! Note : P.S. Possible customizations in the query are:> custom_select\u00a0> custom_from\u00a0> custom_where\u00a0> custom_order_byOrder by will be considered [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,9],"tags":[15,12,13],"class_list":["post-132","post","type-post","status-publish","format-standard","hentry","category-sugarcrm","category-suitecrm","tag-listview","tag-sugarcrm","tag-suitecrm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Extending\/Customize List View - TechCRM<\/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.techcrm.in\/blogs\/extending-customize-list-view\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Extending\/Customize List View - TechCRM\" \/>\n<meta property=\"og:description\" content=\"Today We came across a forum question which asked to hide &#8220;Closed Lost&#8221; opportunities from list view. Simple steps and you are through! Step 1: Create or edit custom\/modules\/Opportunities\/views\/view.list.php and add following code, Step 2: Refresh list view! Note : P.S. Possible customizations in the query are:&gt; custom_select\u00a0&gt; custom_from\u00a0&gt; custom_where\u00a0&gt; custom_order_byOrder by will be considered [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.techcrm.in\/blogs\/extending-customize-list-view\/\" \/>\n<meta property=\"og:site_name\" content=\"TechCRM\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-25T07:32:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-08T09:25:35+00:00\" \/>\n<meta name=\"author\" content=\"Navin Rakhonde\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Navin Rakhonde\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.techcrm.in\/blogs\/extending-customize-list-view\/\",\"url\":\"https:\/\/www.techcrm.in\/blogs\/extending-customize-list-view\/\",\"name\":\"Extending\/Customize List View - TechCRM\",\"isPartOf\":{\"@id\":\"https:\/\/www.techcrm.in\/blogs\/#website\"},\"datePublished\":\"2019-08-25T07:32:45+00:00\",\"dateModified\":\"2020-09-08T09:25:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/992dfe427bb53dcdfd72dd80e3ef9dbc\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.techcrm.in\/blogs\/extending-customize-list-view\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.techcrm.in\/blogs\/extending-customize-list-view\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.techcrm.in\/blogs\/extending-customize-list-view\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.techcrm.in\/blogs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SugarCRM\",\"item\":\"https:\/\/www.techcrm.in\/blogs\/category\/sugarcrm\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Extending\/Customize List View\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.techcrm.in\/blogs\/#website\",\"url\":\"https:\/\/www.techcrm.in\/blogs\/\",\"name\":\"TechCRM\",\"description\":\"Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.techcrm.in\/blogs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/992dfe427bb53dcdfd72dd80e3ef9dbc\",\"name\":\"Navin Rakhonde\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9cc8fd1b948255055b85e5d41dabfc6e704f806d180a1e21cb8fb378e2f5c022?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9cc8fd1b948255055b85e5d41dabfc6e704f806d180a1e21cb8fb378e2f5c022?s=96&d=mm&r=g\",\"caption\":\"Navin Rakhonde\"},\"sameAs\":[\"https:\/\/www.techcrm.in\/\"],\"url\":\"https:\/\/www.techcrm.in\/blogs\/author\/navin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Extending\/Customize List View - TechCRM","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.techcrm.in\/blogs\/extending-customize-list-view\/","og_locale":"en_US","og_type":"article","og_title":"Extending\/Customize List View - TechCRM","og_description":"Today We came across a forum question which asked to hide &#8220;Closed Lost&#8221; opportunities from list view. Simple steps and you are through! Step 1: Create or edit custom\/modules\/Opportunities\/views\/view.list.php and add following code, Step 2: Refresh list view! Note : P.S. Possible customizations in the query are:> custom_select\u00a0> custom_from\u00a0> custom_where\u00a0> custom_order_byOrder by will be considered [&hellip;]","og_url":"https:\/\/www.techcrm.in\/blogs\/extending-customize-list-view\/","og_site_name":"TechCRM","article_published_time":"2019-08-25T07:32:45+00:00","article_modified_time":"2020-09-08T09:25:35+00:00","author":"Navin Rakhonde","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Navin Rakhonde","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.techcrm.in\/blogs\/extending-customize-list-view\/","url":"https:\/\/www.techcrm.in\/blogs\/extending-customize-list-view\/","name":"Extending\/Customize List View - TechCRM","isPartOf":{"@id":"https:\/\/www.techcrm.in\/blogs\/#website"},"datePublished":"2019-08-25T07:32:45+00:00","dateModified":"2020-09-08T09:25:35+00:00","author":{"@id":"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/992dfe427bb53dcdfd72dd80e3ef9dbc"},"breadcrumb":{"@id":"https:\/\/www.techcrm.in\/blogs\/extending-customize-list-view\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.techcrm.in\/blogs\/extending-customize-list-view\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.techcrm.in\/blogs\/extending-customize-list-view\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.techcrm.in\/blogs\/"},{"@type":"ListItem","position":2,"name":"SugarCRM","item":"https:\/\/www.techcrm.in\/blogs\/category\/sugarcrm\/"},{"@type":"ListItem","position":3,"name":"Extending\/Customize List View"}]},{"@type":"WebSite","@id":"https:\/\/www.techcrm.in\/blogs\/#website","url":"https:\/\/www.techcrm.in\/blogs\/","name":"TechCRM","description":"Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.techcrm.in\/blogs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/992dfe427bb53dcdfd72dd80e3ef9dbc","name":"Navin Rakhonde","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9cc8fd1b948255055b85e5d41dabfc6e704f806d180a1e21cb8fb378e2f5c022?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9cc8fd1b948255055b85e5d41dabfc6e704f806d180a1e21cb8fb378e2f5c022?s=96&d=mm&r=g","caption":"Navin Rakhonde"},"sameAs":["https:\/\/www.techcrm.in\/"],"url":"https:\/\/www.techcrm.in\/blogs\/author\/navin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/posts\/132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/comments?post=132"}],"version-history":[{"count":1,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/posts\/132\/revisions"}],"predecessor-version":[{"id":133,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/posts\/132\/revisions\/133"}],"wp:attachment":[{"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/media?parent=132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/categories?post=132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/tags?post=132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}