{"id":65,"date":"2019-08-24T09:00:02","date_gmt":"2019-08-24T09:00:02","guid":{"rendered":"https:\/\/www.techcrm.in\/blogs\/?p=65"},"modified":"2020-09-08T14:55:48","modified_gmt":"2020-09-08T09:25:48","slug":"reverse-the-listview-action-buttons","status":"publish","type":"post","link":"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/","title":{"rendered":"Reverse The ListView Action Buttons"},"content":{"rendered":"\n<p>Interesting question asked on community forum, would love to share its solution!<\/p>\n\n\n\n<p><strong> Question : Can we do a reversal of ListView Action buttons ? <\/strong><\/p>\n\n\n\n<p>We have done the code for Accounts module. Change it as per your requirement. <\/p>\n\n\n\n<p>Steps are as below,<\/p>\n\n\n\n<p>1. <strong>Write the following code into custom\/modules\/Accounts\/views\/view.list.php<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');   \n\n  require_once('include\/MVC\/View\/views\/view.list.php');\n  class AccountsViewList extends ViewList {\n    public function preDisplay()\n    {\n      parent::preDisplay();\n      require_once('custom\/include\/ListView\/ListViewSmartyAccounts.php');\n      $this->lv = new ListViewSmartyAccounts();\n    }\n  }<\/code><\/pre>\n\n\n\n<p>2. &nbsp;<strong>Write the following code into custom\/include\/ListView\/ListViewSmartyAccounts.php <\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');   \n\n  require_once('include\/ListView\/ListViewSmarty.php');\n  class ListViewSmartyAccounts extends ListViewSmarty {\n    function buildActionsLink($id = 'actions_link', $location = 'top')\n    {\n      $link = parent::buildActionsLink();\n      $link['buttons'] = array_reverse($link['buttons']);\n      return $link;\n    }\n  }<\/code><\/pre>\n\n\n\n<p>3. <strong>Refresh the Accounts ListView page and see the effect.<\/strong> <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"282\" height=\"196\" src=\"https:\/\/www.techcrm.in\/blogs\/wp-content\/uploads\/2019\/08\/reverse-the-listview-action-buttons-output1.jpg\" alt=\"\" class=\"wp-image-67\"\/><figcaption>Before Customization<\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"278\" height=\"197\" src=\"https:\/\/www.techcrm.in\/blogs\/wp-content\/uploads\/2019\/08\/reverse-the-listview-action-buttons-output2.jpg\" alt=\"\" class=\"wp-image-68\"\/><figcaption> After Customization <\/figcaption><\/figure><\/div>\n\n\n\n<p>\n\nHope you find this blog post helpful.<\/p>\n\n\n\n<p>Feel free to add comments and queries, that helps us to improve the quality of posts.<\/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.\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Interesting question asked on community forum, would love to share its solution! Question : Can we do a reversal of ListView Action buttons ? We have done the code for Accounts module. Change it as per your requirement. Steps are as below, 1. Write the following code into custom\/modules\/Accounts\/views\/view.list.php 2. &nbsp;Write the following code into [&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-65","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>Reverse The ListView Action Buttons - 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\/reverse-the-listview-action-buttons\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Reverse The ListView Action Buttons - TechCRM\" \/>\n<meta property=\"og:description\" content=\"Interesting question asked on community forum, would love to share its solution! Question : Can we do a reversal of ListView Action buttons ? We have done the code for Accounts module. Change it as per your requirement. Steps are as below, 1. Write the following code into custom\/modules\/Accounts\/views\/view.list.php 2. &nbsp;Write the following code into [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/\" \/>\n<meta property=\"og:site_name\" content=\"TechCRM\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-24T09:00:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-08T09:25:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.techcrm.in\/blogs\/wp-content\/uploads\/2019\/08\/reverse-the-listview-action-buttons-output1.jpg\" \/>\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\/reverse-the-listview-action-buttons\/\",\"url\":\"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/\",\"name\":\"Reverse The ListView Action Buttons - TechCRM\",\"isPartOf\":{\"@id\":\"https:\/\/www.techcrm.in\/blogs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.techcrm.in\/blogs\/wp-content\/uploads\/2019\/08\/reverse-the-listview-action-buttons-output1.jpg\",\"datePublished\":\"2019-08-24T09:00:02+00:00\",\"dateModified\":\"2020-09-08T09:25:48+00:00\",\"author\":{\"@id\":\"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/992dfe427bb53dcdfd72dd80e3ef9dbc\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/#primaryimage\",\"url\":\"https:\/\/www.techcrm.in\/blogs\/wp-content\/uploads\/2019\/08\/reverse-the-listview-action-buttons-output1.jpg\",\"contentUrl\":\"https:\/\/www.techcrm.in\/blogs\/wp-content\/uploads\/2019\/08\/reverse-the-listview-action-buttons-output1.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/#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\":\"Reverse The ListView Action Buttons\"}]},{\"@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":"Reverse The ListView Action Buttons - 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\/reverse-the-listview-action-buttons\/","og_locale":"en_US","og_type":"article","og_title":"Reverse The ListView Action Buttons - TechCRM","og_description":"Interesting question asked on community forum, would love to share its solution! Question : Can we do a reversal of ListView Action buttons ? We have done the code for Accounts module. Change it as per your requirement. Steps are as below, 1. Write the following code into custom\/modules\/Accounts\/views\/view.list.php 2. &nbsp;Write the following code into [&hellip;]","og_url":"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/","og_site_name":"TechCRM","article_published_time":"2019-08-24T09:00:02+00:00","article_modified_time":"2020-09-08T09:25:48+00:00","og_image":[{"url":"https:\/\/www.techcrm.in\/blogs\/wp-content\/uploads\/2019\/08\/reverse-the-listview-action-buttons-output1.jpg"}],"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\/reverse-the-listview-action-buttons\/","url":"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/","name":"Reverse The ListView Action Buttons - TechCRM","isPartOf":{"@id":"https:\/\/www.techcrm.in\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/#primaryimage"},"image":{"@id":"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/#primaryimage"},"thumbnailUrl":"https:\/\/www.techcrm.in\/blogs\/wp-content\/uploads\/2019\/08\/reverse-the-listview-action-buttons-output1.jpg","datePublished":"2019-08-24T09:00:02+00:00","dateModified":"2020-09-08T09:25:48+00:00","author":{"@id":"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/992dfe427bb53dcdfd72dd80e3ef9dbc"},"breadcrumb":{"@id":"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/#primaryimage","url":"https:\/\/www.techcrm.in\/blogs\/wp-content\/uploads\/2019\/08\/reverse-the-listview-action-buttons-output1.jpg","contentUrl":"https:\/\/www.techcrm.in\/blogs\/wp-content\/uploads\/2019\/08\/reverse-the-listview-action-buttons-output1.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.techcrm.in\/blogs\/reverse-the-listview-action-buttons\/#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":"Reverse The ListView Action Buttons"}]},{"@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\/65","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=65"}],"version-history":[{"count":3,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":100,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/posts\/65\/revisions\/100"}],"wp:attachment":[{"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/tags?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}