{"id":217,"date":"2010-04-13T06:29:00","date_gmt":"2010-04-13T06:29:00","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/?p=217"},"modified":"2010-04-13T06:29:00","modified_gmt":"2010-04-13T06:29:00","slug":"territory-profiles-issue-in-crm","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/04\/13\/territory-profiles-issue-in-crm\/","title":{"rendered":"Territory Profiles Issue in CRM"},"content":{"rendered":"<p>Territories and Territory profiles are the salient features provided by Sage CRM. These functionalities are most important in order to handle the data security worldwide as per the organizational structures.<\/p>\n<p>As we all know that Territory profiles are used to handle the access rights. We can create profile, set access rights for the primary entities present in the CRM as (Insert\/View\/Edit\/Delete) as per the requirement. And then set profile to user so accordingly that user gets access for particular entity in CRM.<\/p>\n<p>Now the question is, have you ever been come across a situation like CRM is not working properly whenever the profiles are set for the user? It only works for System Admin users or the users belonging to worldwide territory.<\/p>\n<p>If yes, then you just need to check your CRM version. In custom ASP pages if we need to hide or show buttons OR fields on the basis of access rights set for users our normal methodology is to write code like given below.<\/p>\n<p><em>if(eWare.Button(&#8220;&#8221;,&#8221;&#8221;, &#8220;Item&#8221;,&#8221;CASES&#8221;,&#8221;EDIT&#8221;))<br \/>{<br \/>Response.Write(&#8220;You have case edit rights!&#8221;);<br \/>container.AddButton(CRM.Button(&#8220;Add Project&#8221;, &#8220;cancel.gif&#8221;, CRM.Url(&#8220;Project\/ProjectNew.asp&#8221;)+&#8221;&amp;T=find&amp;E=TestCase&#8221;));<br \/>}<br \/>else<br \/>{<br \/>Response.Write(&#8220;You don\u2019t&#8217; have case edit rights!&#8221;);<br \/>}<\/em><br \/><em><\/em><br \/>This code works fine in Sage CRM 6.0 (no patch), but strange to find that the same code doesn\u2019t work in CRM 6.1 patch C.  Same is the case with CRM 6.2 SP1.<\/p>\n<p>Based on our investigation, we came across the fact that for Non-admin user if we set territory other than Worldwide (any child territory) and set the profile rights as ViewEdit (in which user has just View and Edit rights on the Company, Person and Case entities) and use these settings through above code then it won\u2019t work in versions we have mentioned. What if this affects the flow of functionality and data security and you are not in position to upgrade to higher versions?<\/p>\n<p>Now how to resolve this: As we can not use standard profile settings using CRM standard way, we will have to do this programmatically. CRM maintains all the access\/permissions entries in the TerritoryPermission table. To enable buttons based on permissions, we will have to read all the rights set into this table for the current user and form the conditions accordingly in our routine in order to hide or show the buttons.<\/p>\n<p>Please keep in mind that while checking the rights you will have to consider all the security policies that are applied on CRM. For example: Assigned To, Created By, Home territory rights and Direct Access Rights.<\/p>\n<p><marquee width=\"80%\"><b>If you find this content useful, Please drop us an email at <a title=\"mailto:crm@greytrix.com\" href=\"mailto:crm@greytrix.com\">crm@greytrix.com<\/a>. <\/b><\/marquee><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Territories and Territory profiles are the salient features provided by Sage CRM. These functionalities are most important in order to handle the data security worldwide as per the organizational structures. As we all know that Territory profiles are used to handle the access rights. We can create profile, set access rights for the primary entities\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/04\/13\/territory-profiles-issue-in-crm\/\">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":[1],"tags":[1822,2430],"class_list":["post-217","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-profile","tag-territory"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Territory Profiles Issue in CRM - 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\/2010\/04\/13\/territory-profiles-issue-in-crm\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Territory Profiles Issue in CRM - Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"og:description\" content=\"Territories and Territory profiles are the salient features provided by Sage CRM. These functionalities are most important in order to handle the data security worldwide as per the organizational structures. As we all know that Territory profiles are used to handle the access rights. We can create profile, set access rights for the primary entities\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/04\/13\/territory-profiles-issue-in-crm\/\" \/>\n<meta property=\"og:site_name\" content=\"Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2010-04-13T06:29:00+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\/2010\/04\/13\/territory-profiles-issue-in-crm\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/04\/13\/territory-profiles-issue-in-crm\/\",\"name\":\"Territory Profiles Issue in CRM - Sage CRM \u2013 Tips, Tricks and Components\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website\"},\"datePublished\":\"2010-04-13T06:29:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/04\/13\/territory-profiles-issue-in-crm\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/04\/13\/territory-profiles-issue-in-crm\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/04\/13\/territory-profiles-issue-in-crm\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Territory Profiles Issue in CRM\"}]},{\"@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":"Territory Profiles Issue in CRM - 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\/2010\/04\/13\/territory-profiles-issue-in-crm\/","og_locale":"en_US","og_type":"article","og_title":"Territory Profiles Issue in CRM - Sage CRM \u2013 Tips, Tricks and Components","og_description":"Territories and Territory profiles are the salient features provided by Sage CRM. These functionalities are most important in order to handle the data security worldwide as per the organizational structures. As we all know that Territory profiles are used to handle the access rights. We can create profile, set access rights for the primary entities\u2026 Read More &raquo;","og_url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/04\/13\/territory-profiles-issue-in-crm\/","og_site_name":"Sage CRM \u2013 Tips, Tricks and Components","article_published_time":"2010-04-13T06:29:00+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\/2010\/04\/13\/territory-profiles-issue-in-crm\/","url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/04\/13\/territory-profiles-issue-in-crm\/","name":"Territory Profiles Issue in CRM - Sage CRM \u2013 Tips, Tricks and Components","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website"},"datePublished":"2010-04-13T06:29:00+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f"},"breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/04\/13\/territory-profiles-issue-in-crm\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/04\/13\/territory-profiles-issue-in-crm\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2010\/04\/13\/territory-profiles-issue-in-crm\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/"},{"@type":"ListItem","position":2,"name":"Territory Profiles Issue in CRM"}]},{"@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\/217","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=217"}],"version-history":[{"count":0,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/217\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/media?parent=217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/categories?post=217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/tags?post=217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}