{"id":12803,"date":"2016-05-30T09:27:37","date_gmt":"2016-05-30T09:27:37","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/?p=12803"},"modified":"2016-05-30T09:27:37","modified_gmt":"2016-05-30T09:27:37","slug":"restrict-access-to-certain-entity-with-sql-conditions","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/","title":{"rendered":"Restrict access to certain entity with SQL conditions"},"content":{"rendered":"<p style=\"text-align: justify;\">With the help of scripting we can help our customers to achieve their requirement and make it more usable. In this blog, I will explain how we can restrict users to have access to certain entity such as <strong>Advanced Find<\/strong> and <strong>Keyword search<\/strong> which appears when Find button is clicked.<\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><strong><em><span style=\"color: #993300;\">New stuff:<\/span>\u00a0<\/em><\/strong><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/highlight-checked-checkboxes-using-jquery\/\" target=\"_blank\">Highlight Checked Checkboxes using jQuery<\/a><\/span><\/p>\n<p style=\"text-align: justify;\">Recently, we received one requirement from our client wherein he wanted to hide Advanced Find functionality for users other than admin. To fulfill this requirement we followed below mentioned steps:<\/p>\n<ul>\n<li>Go to <strong>Administration | Advanced Customization | System Menus<\/strong><\/li>\n<li>Select <strong>Advanced Find<\/strong> option as shown in below image.<\/li>\n<li>Enter SQL condition in SQL field as <strong><em>\u201cUser_Userid=1\u201d<\/em><\/strong><\/li>\n<li>Click on <strong>Update<\/strong> and then <strong>Save<\/strong><\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2016\/05\/Img1.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-12804\" src=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2016\/05\/Img1.jpg\" alt=\"Img1\" width=\"626\" height=\"267\" \/><\/a><br \/>\nOnce we have applied the SQL condition the screen will look like as shown below.<br \/>\n<a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2016\/05\/Img3.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-12805\" src=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2016\/05\/Img3.jpg\" alt=\"Img3\" width=\"199\" height=\"252\" \/><\/a><br \/>\n<span style=\"color: #993300;\"><strong><em>Also Read:<\/em><\/strong><\/span><br \/>\n<span style=\"color: #000000;\"><strong>1.<\/strong> <a href=\"http:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2011\/04\/26\/how-to-hide-custom-control-when-relevant-tab-is-not-active\/\" target=\"_blank\">How to hide custom control when relevant tab is not active<\/a><br \/>\n<strong>2.<\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/09\/23\/trick-to-remove-main-menu-from-pop-up-windows-in-sage-crm-v7-2\/\" target=\"_blank\">Trick to remove Main Menu from pop-up windows in Sage CRM v7.2<\/a><br \/>\n<strong>3.<\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2015\/01\/09\/how-to-add-or-remove-tabs-from-my-crm\/\" target=\"_blank\">How to Add or Remove tabs from My CRM <\/a><br \/>\n<strong>4.<\/strong><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/06\/06\/hide-unwanted-buttons-in-sage-crm-7-2\/\" target=\"_blank\"> Hide Unwanted Buttons in Sage CRM 7.2<\/a><br \/>\n<strong>5.<\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/09\/25\/tab-control-in-sage-crm-v7-2-2\/\" target=\"_blank\">Tab Control in Sage CRM v7.2<\/a> <\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>With the help of scripting we can help our customers to achieve their requirement and make it more usable. In this blog, I will explain how we can restrict users to have access to certain entity such as Advanced Find and Keyword search which appears when Find button is clicked. New stuff:\u00a0Highlight Checked Checkboxes using\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117,137,157,332,352,380,1,417,421],"tags":[1156,1157,1934,1935,2328,2391],"class_list":["post-12803","post","type-post","status-publish","format-standard","hentry","category-disable","category-entity","category-find-sage-crm","category-sage-crm","category-script","category-sql","category-uncategorized","category-user","category-validate-script","tag-find-list","tag-find-options","tag-restrict-access","tag-restrict-access-based-on-user","tag-sql-conditions","tag-system-menus"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Restrict access to certain entity with SQL conditions - 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\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Restrict access to certain entity with SQL conditions - Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"og:description\" content=\"With the help of scripting we can help our customers to achieve their requirement and make it more usable. In this blog, I will explain how we can restrict users to have access to certain entity such as Advanced Find and Keyword search which appears when Find button is clicked. New stuff:\u00a0Highlight Checked Checkboxes using\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/\" \/>\n<meta property=\"og:site_name\" content=\"Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2016-05-30T09:27:37+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2016\/05\/Img1.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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/\",\"name\":\"Restrict access to certain entity with SQL conditions - Sage CRM \u2013 Tips, Tricks and Components\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2016\/05\/Img1.jpg\",\"datePublished\":\"2016-05-30T09:27:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/#primaryimage\",\"url\":\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2016\/05\/Img1.jpg\",\"contentUrl\":\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2016\/05\/Img1.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Restrict access to certain entity with SQL conditions\"}]},{\"@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":"Restrict access to certain entity with SQL conditions - 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\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/","og_locale":"en_US","og_type":"article","og_title":"Restrict access to certain entity with SQL conditions - Sage CRM \u2013 Tips, Tricks and Components","og_description":"With the help of scripting we can help our customers to achieve their requirement and make it more usable. In this blog, I will explain how we can restrict users to have access to certain entity such as Advanced Find and Keyword search which appears when Find button is clicked. New stuff:\u00a0Highlight Checked Checkboxes using\u2026 Read More &raquo;","og_url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/","og_site_name":"Sage CRM \u2013 Tips, Tricks and Components","article_published_time":"2016-05-30T09:27:37+00:00","og_image":[{"url":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2016\/05\/Img1.jpg","type":"","width":"","height":""}],"author":"greysagecrm","twitter_card":"summary_large_image","twitter_misc":{"Written by":"greysagecrm","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/","url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/","name":"Restrict access to certain entity with SQL conditions - Sage CRM \u2013 Tips, Tricks and Components","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/#primaryimage"},"image":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/#primaryimage"},"thumbnailUrl":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2016\/05\/Img1.jpg","datePublished":"2016-05-30T09:27:37+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f"},"breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/#primaryimage","url":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2016\/05\/Img1.jpg","contentUrl":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2016\/05\/Img1.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/05\/30\/restrict-access-to-certain-entity-with-sql-conditions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/"},{"@type":"ListItem","position":2,"name":"Restrict access to certain entity with SQL conditions"}]},{"@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\/12803","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=12803"}],"version-history":[{"count":0,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/12803\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/media?parent=12803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/categories?post=12803"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/tags?post=12803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}