{"id":6179,"date":"2017-08-04T18:44:13","date_gmt":"2017-08-04T13:14:13","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=6179"},"modified":"2017-08-04T18:44:13","modified_gmt":"2017-08-04T13:14:13","slug":"change-the-background-of-list-view-row-dynamically-in-resco","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2017\/08\/change-the-background-of-list-view-row-dynamically-in-resco\/","title":{"rendered":"Change the background of List Row dynamically in Resco"},"content":{"rendered":"<h4 style=\"text-align: justify;\"><strong>Introduction:<\/strong><\/h4>\n<p style=\"text-align: justify;\">We had a business requirement to change the background color of the <strong><em>List Row<\/em><\/strong> based on the status of the record i.e. change the background color of List Row to <span style=\"color: #ff0000;\">red<\/span> if the record status is inactive.<\/p>\n<h4 style=\"text-align: justify;\"><strong>Steps to change the background color of List Row:<\/strong><\/h4>\n<p style=\"padding-left: 30px; text-align: justify;\"><strong>1<\/strong>. In Resco Woodford project, go to the <strong><em>Account entity &gt; Expand it &gt; Click on the View<\/em><\/strong>. Once you click on the view, the List of views will open as shown in the screenshot below;<\/p>\n<p style=\"padding-left: 30px; text-align: center;\"><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/08\/Change-the-background-of-List-View-Row-dynamically-in-Resco1.png\"><img decoding=\"async\" class=\"aligncenter wp-image-6172 \" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/08\/Change-the-background-of-List-View-Row-dynamically-in-Resco1.png\" alt=\"Change the background of List (View) Row dynamically in Resco\" width=\"783\" height=\"305\" \/><\/a><\/p>\n<p style=\"padding-left: 30px; text-align: justify;\"><strong>2<\/strong>. Now Select and open the view where you need to change the background color of the row based on the status of the record. In this example, we have selected the <strong><em>\u2018Default\u2019<\/em><\/strong><\/p>\n<p style=\"padding-left: 30px; text-align: justify;\"><strong>3<\/strong>. Once you open the view, the following window will open. Clone the existing row by clicking on the <strong><em>\u2018Clone Row\u2019<\/em><\/strong> button as seen in the screenshot below;<\/p>\n<p style=\"padding-left: 30px; text-align: center;\"><img decoding=\"async\" class=\"wp-image-6173 aligncenter\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/08\/Change-the-background-of-List-View-Row-dynamically-in-Resco2.png\" alt=\"Change the background of List (View) Row dynamically in Resco\" width=\"794\" height=\"369\" \/><\/p>\n<p style=\"padding-left: 30px; text-align: justify;\"><strong>4<\/strong>. After cloning the existing row of the List (View), give an appropriate name &amp; change the color of the newly cloned row as seen in the screenshot below;<\/p>\n<p style=\"padding-left: 30px; text-align: center;\"><img decoding=\"async\" class=\"wp-image-6174 aligncenter\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/08\/Change-the-background-of-List-View-Row-dynamically-in-Resco3.png\" alt=\"Change the background of List (View) Row dynamically in Resco\" width=\"790\" height=\"355\" \/><\/p>\n<p style=\"padding-left: 30px; text-align: justify;\"><strong>5<\/strong>. Once you have completed the above four steps, we would now need to add <strong><em>Row Script<\/em><\/strong> to the view. Row Script defines when the above two row are switched based on the record status. For example, in the Row script you define, if the record is inactive then show the \u2018Inactive Account\u2019 row else show the default row. Row Script works similar to the business rule in CRM.<\/p>\n<p style=\"padding-left: 30px; text-align: justify;\"><strong>6<\/strong>. To add the Row Script to view, click on the <strong><em>\u2018Row Script\u2019<\/em><\/strong> button as seen in the screenshot below;<\/p>\n<p style=\"padding-left: 30px; text-align: center;\"><img decoding=\"async\" class=\"wp-image-6175 aligncenter\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/08\/Change-the-background-of-List-View-Row-dynamically-in-Resco4.png\" alt=\"Change the background of List (View) Row dynamically in Resco\" width=\"787\" height=\"303\" \/><\/p>\n<p style=\"padding-left: 30px; text-align: justify;\"><strong>7<\/strong>. After clicking on the <strong><em>\u2018Row Script\u2019<\/em><\/strong> button, the following window will open, where we have to provide the logic for switching the row based on a particular condition.<\/p>\n<blockquote>\n<p style=\"padding-left: 30px; text-align: justify;\"><strong><em>Note: You can add the condition as per the requirement by clicking on \u2018Add Condition\u2019 button as seen in the screenshot below.<\/em><\/strong><\/p>\n<\/blockquote>\n<p style=\"padding-left: 30px; text-align: center;\"><img decoding=\"async\" class=\"wp-image-6176 aligncenter\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/08\/Change-the-background-of-List-View-Row-dynamically-in-Resco5.png\" alt=\"Change the background of List (View) Row dynamically in Resco\" width=\"769\" height=\"294\" \/><\/p>\n<p style=\"text-align: justify;\">Once you have completed all the above steps, open the Resco Mobile CRM app, sync it and then click on the account. Here you can see that the inactive account now has the red background color as seen in the screenshot below;<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"wp-image-6177 aligncenter\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/08\/Change-the-background-of-List-View-Row-dynamically-in-Resco6.png\" alt=\"Change the background of List (View) Row dynamically in Resco\" width=\"772\" height=\"153\" \/><\/p>\n<p><strong>Conclusion:<\/strong><\/p>\n<p style=\"text-align: justify;\">Using Row Scripts, users can define the conditions that should be met to change the background color of the List Row automatically. This help user to identify what to focus on.<\/p>\n<p style=\"text-align: justify;\"><a href=\"http:\/\/www.inogic.com\/product\/productivity-pack\/click-2-export-microsoft-dynamics-crm-reports\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"alignnone wp-image-6069 \" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/07\/Easily-Export-Dynamics-365-Reports-in-PDF-Word-or-Excel.png\" alt=\"Easily Export and Download or Email Dynamics 365 Reports in PDF, Word, or Excel\" width=\"828\" height=\"207\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\n","protected":false},"excerpt":{"rendered":"<p>Introduction: We had a business requirement to change the background color of the List Row based on the status of the record i.e. change the background color of List Row to red if the record status is inactive. Steps to change the background color of List Row: 1. In Resco Woodford project, go to the\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2017\/08\/change-the-background-of-list-view-row-dynamically-in-resco\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":6178,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[16,19,48],"tags":[1447],"class_list":["post-6179","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-365","category-dynamics-crm","category-resco-mobile-crm","tag-resco-mobile-crm"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/6179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=6179"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/6179\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media\/6178"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=6179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=6179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=6179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}