{"id":1114,"date":"2014-12-31T13:07:15","date_gmt":"2014-12-31T07:37:15","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=1114"},"modified":"2014-12-31T13:07:15","modified_gmt":"2014-12-31T07:37:15","slug":"a-tip-while-working-with-field-level-security","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2014\/12\/a-tip-while-working-with-field-level-security\/","title":{"rendered":"A Tip while Working with Field Level Security"},"content":{"rendered":"<p style=\"text-align: justify;\">Recently we came across a situation. We had a workflow in which we used a field which had field level security enabled on it. There was a custom field called \u201cCredit Amount\u201d that existed on the Account and had a field security enabled on it.<\/p>\n<p style=\"text-align: justify;\">The workflow in which we were using this field checked a condition whether\u00a0the field Credit Amount\u00a0contained value in it. You can see in the below screen that the\u00a0workflow was also set to execute under a logged in user\u2019s context.<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Workflow.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1115\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Workflow.jpg\" alt=\"Workflow\" width=\"494\" height=\"441\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">Now, the problem was that when the workflow was executed, it was not performing its operations. Since the Credit Amount field was\u00a0a secured field and the user who was running this workflow did not have the privilege to read the field value, while checking the value of this field condition in workflow,\u00a0it\u00a0always returned NULL even if there was\u00a0an existing value in this field. Due to this the workflow did\u00a0not meet with condition and perform the operations. To overcome this situation, we simply modified the workflow to execute it as the OWNER of the workflow.<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Workflow1.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1116\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Workflow1.jpg\" alt=\"Workflow\" width=\"519\" height=\"425\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">So before using fields in the workflow conditions, please check if the field has field security enabled on it or the workflow should run under the user who has appropriate security role.<\/p>\n<p style=\"text-align: justify;\">Hope this helps!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently we came across a situation. We had a workflow in which we used a field which had field level security enabled on it. There was a custom field called \u201cCredit Amount\u201d that existed on the Account and had a field security enabled on it. The workflow in which we were using this field checked\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2014\/12\/a-tip-while-working-with-field-level-security\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"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":[19,21,22,24,51],"tags":[395,800,1562,1841],"class_list":["post-1114","post","type-post","status-publish","format-standard","hentry","category-dynamics-crm","category-dynamics-crm-2013","category-dynamics-crm-2015","category-dynamics-crm-2016","category-security","tag-crm-2013-dynamics-crm-2013","tag-field","tag-security","tag-workflow"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/1114","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=1114"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/1114\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=1114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=1114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=1114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}