{"id":22888,"date":"2020-02-20T12:37:21","date_gmt":"2020-02-20T12:37:21","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=22888"},"modified":"2020-02-20T12:37:21","modified_gmt":"2020-02-20T12:37:21","slug":"programmatically-validate-pre-post-plugin-step","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/","title":{"rendered":"Programmatically validate Pre\/Post plugin step"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p>In this blog, we will see how to programmatically check whether plugin step already exists or not for both Pre &amp; Post stage.<\/p>\n<p style=\"text-align: justify;\">We came across this situation when we received a requirement, where we had to programmatically register plugins. Well, the registration piece was quite easy, however, we struggled to see if the step was already registered or not.<\/p>\n<p>For this, we came up with the following solution:<br \/>\nIn order to check whether the plugin already exists or not we need to retrieve entity with specific attributes.<\/p>\n<pre class=\"lang:default decode:true \"> \/\/Variables\r\nQueryByAttribute _Query = null;\r\n\r\nRetrieveMultipleRequest _Request = null;\r\n\r\nRetrieveMultipleResponse _Response = null;\r\n\r\nEntityCollection _EntityColl = null;\r\n\r\nEntity _Entity = null;\r\n\r\n\u00a0\r\n\r\n\/\/Code\r\n\r\n\u00a0\r\n\r\n_Query = new QueryByAttribute();\r\n\r\n\u00a0\r\n\r\n_Request = new RetrieveMultipleRequest();\r\n\r\n\u00a0\r\n\r\n_Query.EntityName = \u201caccount\u201d;\r\n\r\n\u00a0\r\n\r\n_Query.ColumnSet = new ColumnSet(_RetrieveColumns);\r\n\r\n\u00a0\r\n\r\n_Query.Attributes.AddRange(_FilterByColumns);\r\n\r\n\u00a0\r\n\r\n_Query.Values.AddRange(_FilterByColumnsValue);\r\n\r\n\u00a0\r\n\r\n_Request.Query = _Query;\r\n\r\n\u00a0\r\n\r\n_Response = (RetrieveMultipleResponse)_CrmWebService.Execute(_Request);\r\n\r\n_EntityColl = _Response.EntityCollection;\r\n\r\n\u00a0\r\n\r\n\/\/Check if the EntityCollection is not empty\r\n\r\nif (_EntityColl != null &amp;&amp; _EntityColl.Entities.Count &gt; 0)\r\n\r\n{\r\n\r\n_Tracing.Trace(\"Found entity\");\r\n\r\n\/\/Return the topmost entity of the entitycollection\r\n\r\n_Entity = (Entity)_EntityColl.Entities[0];\r\n\r\n}<\/pre>\n<p>\/\/Stage is added here to check plugin is added already on pre\/post operation for selected entity \u2013 we need to pass stage as an parameter<\/p>\n<p>In above example \u201c_RetrieveColumns\u201d contain columns need to be retrieve, \u201c_FilterByColumns\u201d contains filter attributes and \u201c_FilterByColumnsValue\u201d contains filter attributes values on which we want to check.<\/p>\n<pre class=\"lang:default decode:true \">_RetrieveColumns = new string[] { \"sdkmessagefilterid\" }\r\n\r\n_FilterByColumns = new string[] { \"plugintypeid\", \"sdkmessageid\", \"sdkmessagefilterid\", <strong>\"stage\"<\/strong>}\r\n\r\n_FilterByColumnsValue = new object[] { PluginTypeEntityRef.Id, SDKMessageIdRefrence.Id, SdkMsgFiltrEntityRef.Id, SdkStep.Stage.Value };<\/pre>\n<h2><\/h2>\n<h2>Conclusion<\/h2>\n<p>Thus, with the above code you can programmatically check whether the plugin step is registered or not for pre\/post stage.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/product\/components\/kanban-board-dynamics-365-crm\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-22892\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/02\/Kanban-Board.jpg\" alt=\"Kanban Board\" width=\"800\" height=\"200\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/02\/Kanban-Board.jpg 800w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/02\/Kanban-Board-300x75.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/02\/Kanban-Board-768x192.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/02\/Kanban-Board-660x165.jpg 660w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this blog, we will see how to programmatically check whether plugin step already exists or not for both Pre &amp; Post stage. We came across this situation when we received a requirement, where we had to programmatically register plugins. Well, the registration piece was quite easy, however, we struggled to see if the\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/\">Read More: Programmatically validate Pre\/Post plugin step &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":22891,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,19,42],"tags":[2012],"class_list":["post-22888","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-365","category-dynamics-crm","category-plugin","tag-pre-post-plugin"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Introduction In this blog, we will see how to programmatically check whether plugin step already exists or not for both Pre &amp; Post stage. We came across this situation when we received a requirement, where we had to programmatically register plugins. Well, the registration piece was quite easy, however, we struggled to see if the\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Tushar\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Microsoft Dynamics 365 CRM Tips and Tricks - By Inogic\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Programmatically validate Pre\/Post plugin step - Microsoft Dynamics 365 CRM Tips and Tricks\" \/>\n\t\t<meta property=\"og:description\" content=\"Introduction In this blog, we will see how to programmatically check whether plugin step already exists or not for both Pre &amp; Post stage. We came across this situation when we received a requirement, where we had to programmatically register plugins. Well, the registration piece was quite easy, however, we struggled to see if the\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/02\/Kanban-Board.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/02\/Kanban-Board.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t\t<meta property=\"og:image:height\" content=\"200\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-02-20T12:37:21+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-02-20T12:37:21+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inogicindia\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@inogic\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Programmatically validate Pre\/Post plugin step - Microsoft Dynamics 365 CRM Tips and Tricks\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Introduction In this blog, we will see how to programmatically check whether plugin step already exists or not for both Pre &amp; Post stage. We came across this situation when we received a requirement, where we had to programmatically register plugins. Well, the registration piece was quite easy, however, we struggled to see if the\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@inogic\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/02\/Kanban-Board.jpg\" \/>\n\t\t<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t\t<meta name=\"twitter:data1\" content=\"Tushar\" \/>\n\t\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/#blogposting\",\"name\":\"Programmatically validate Pre\\\/Post plugin step - Microsoft Dynamics 365 CRM Tips and Tricks\",\"headline\":\"Programmatically validate Pre\\\/Post plugin step\",\"author\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/Programmatically-validate-PrePost-plugin-step.png\",\"width\":150,\"height\":150},\"datePublished\":\"2020-02-20T12:37:21+05:30\",\"dateModified\":\"2020-02-20T12:37:21+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/#webpage\"},\"articleSection\":\"Dynamics 365, Dynamics CRM, Plugin, Pre\\\/Post plugin\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-365\\\/#listItem\",\"name\":\"Dynamics 365\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-365\\\/#listItem\",\"position\":2,\"name\":\"Dynamics 365\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-365\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/#listItem\",\"name\":\"Programmatically validate Pre\\\/Post plugin step\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/#listItem\",\"position\":3,\"name\":\"Programmatically validate Pre\\\/Post plugin step\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-365\\\/#listItem\",\"name\":\"Dynamics 365\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\",\"name\":\"Microsoft Dynamics 365 CRM Tips and Tricks\",\"description\":\"By Inogic\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inogic-logo.png\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/#organizationLogo\",\"width\":1000,\"height\":325,\"caption\":\"inogic logo\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/inogicindia\",\"https:\\\/\\\/twitter.com\\\/inogic\",\"https:\\\/\\\/www.instagram.com\\\/inogicindia\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCM4V7ousgLSu1hbOEv4DUuQ\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/inogicindia\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/\",\"name\":\"Tushar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/839d9ae7d2b941d2d09e91df322267a429821f2ce5494302b53bd5ca3679f1a0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Tushar\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/#webpage\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/\",\"name\":\"Programmatically validate Pre\\\/Post plugin step - Microsoft Dynamics 365 CRM Tips and Tricks\",\"description\":\"Introduction In this blog, we will see how to programmatically check whether plugin step already exists or not for both Pre & Post stage. We came across this situation when we received a requirement, where we had to programmatically register plugins. Well, the registration piece was quite easy, however, we struggled to see if the\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/Programmatically-validate-PrePost-plugin-step.png\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/#mainImage\",\"width\":150,\"height\":150},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2020\\\/02\\\/programmatically-validate-pre-post-plugin-step\\\/#mainImage\"},\"datePublished\":\"2020-02-20T12:37:21+05:30\",\"dateModified\":\"2020-02-20T12:37:21+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/\",\"name\":\"Microsoft Dynamics 365 CRM Tips and Tricks\",\"alternateName\":\"Inogic\",\"description\":\"By Inogic\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Programmatically validate Pre\/Post plugin step - Microsoft Dynamics 365 CRM Tips and Tricks","description":"Introduction In this blog, we will see how to programmatically check whether plugin step already exists or not for both Pre & Post stage. We came across this situation when we received a requirement, where we had to programmatically register plugins. Well, the registration piece was quite easy, however, we struggled to see if the","canonical_url":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/#blogposting","name":"Programmatically validate Pre\/Post plugin step - Microsoft Dynamics 365 CRM Tips and Tricks","headline":"Programmatically validate Pre\/Post plugin step","author":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"publisher":{"@id":"https:\/\/www.inogic.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/02\/Programmatically-validate-PrePost-plugin-step.png","width":150,"height":150},"datePublished":"2020-02-20T12:37:21+05:30","dateModified":"2020-02-20T12:37:21+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/#webpage"},"isPartOf":{"@id":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/#webpage"},"articleSection":"Dynamics 365, Dynamics CRM, Plugin, Pre\/Post plugin"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.inogic.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-365\/#listItem","name":"Dynamics 365"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-365\/#listItem","position":2,"name":"Dynamics 365","item":"https:\/\/www.inogic.com\/blog\/category\/dynamics-365\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/#listItem","name":"Programmatically validate Pre\/Post plugin step"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/#listItem","position":3,"name":"Programmatically validate Pre\/Post plugin step","previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-365\/#listItem","name":"Dynamics 365"}}]},{"@type":"Organization","@id":"https:\/\/www.inogic.com\/blog\/#organization","name":"Microsoft Dynamics 365 CRM Tips and Tricks","description":"By Inogic","url":"https:\/\/www.inogic.com\/blog\/","logo":{"@type":"ImageObject","url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/inogic-logo.png","@id":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/#organizationLogo","width":1000,"height":325,"caption":"inogic logo"},"image":{"@id":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/#organizationLogo"},"sameAs":["https:\/\/www.facebook.com\/inogicindia","https:\/\/twitter.com\/inogic","https:\/\/www.instagram.com\/inogicindia\/","https:\/\/www.youtube.com\/channel\/UCM4V7ousgLSu1hbOEv4DUuQ","https:\/\/www.linkedin.com\/company\/inogicindia"]},{"@type":"Person","@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author","url":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/","name":"Tushar","image":{"@type":"ImageObject","@id":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/839d9ae7d2b941d2d09e91df322267a429821f2ce5494302b53bd5ca3679f1a0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Tushar"}},{"@type":"WebPage","@id":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/#webpage","url":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/","name":"Programmatically validate Pre\/Post plugin step - Microsoft Dynamics 365 CRM Tips and Tricks","description":"Introduction In this blog, we will see how to programmatically check whether plugin step already exists or not for both Pre & Post stage. We came across this situation when we received a requirement, where we had to programmatically register plugins. Well, the registration piece was quite easy, however, we struggled to see if the","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.inogic.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/#breadcrumblist"},"author":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"creator":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/02\/Programmatically-validate-PrePost-plugin-step.png","@id":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/#mainImage","width":150,"height":150},"primaryImageOfPage":{"@id":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/#mainImage"},"datePublished":"2020-02-20T12:37:21+05:30","dateModified":"2020-02-20T12:37:21+05:30"},{"@type":"WebSite","@id":"https:\/\/www.inogic.com\/blog\/#website","url":"https:\/\/www.inogic.com\/blog\/","name":"Microsoft Dynamics 365 CRM Tips and Tricks","alternateName":"Inogic","description":"By Inogic","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.inogic.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Microsoft Dynamics 365 CRM Tips and Tricks - By Inogic","og:type":"article","og:title":"Programmatically validate Pre\/Post plugin step - Microsoft Dynamics 365 CRM Tips and Tricks","og:description":"Introduction In this blog, we will see how to programmatically check whether plugin step already exists or not for both Pre &amp; Post stage. We came across this situation when we received a requirement, where we had to programmatically register plugins. Well, the registration piece was quite easy, however, we struggled to see if the","og:url":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/","og:image":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/02\/Kanban-Board.jpg","og:image:secure_url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/02\/Kanban-Board.jpg","og:image:width":800,"og:image:height":200,"article:published_time":"2020-02-20T12:37:21+00:00","article:modified_time":"2020-02-20T12:37:21+00:00","article:publisher":"https:\/\/www.facebook.com\/inogicindia","twitter:card":"summary_large_image","twitter:site":"@inogic","twitter:title":"Programmatically validate Pre\/Post plugin step - Microsoft Dynamics 365 CRM Tips and Tricks","twitter:description":"Introduction In this blog, we will see how to programmatically check whether plugin step already exists or not for both Pre &amp; Post stage. We came across this situation when we received a requirement, where we had to programmatically register plugins. Well, the registration piece was quite easy, however, we struggled to see if the","twitter:creator":"@inogic","twitter:image":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/02\/Kanban-Board.jpg","twitter:label1":"Written by","twitter:data1":"Tushar","twitter:label2":"Est. reading time","twitter:data2":"1 minute"},"aioseo_meta_data":{"post_id":"22888","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-02-02 06:32:37","updated":"2025-07-04 07:22:47","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\/category\/dynamics-365\/\" title=\"Dynamics 365\">Dynamics 365<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tProgrammatically validate Pre\/Post plugin step\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.inogic.com\/blog"},{"label":"Dynamics 365","link":"https:\/\/www.inogic.com\/blog\/category\/dynamics-365\/"},{"label":"Programmatically validate Pre\/Post plugin step","link":"https:\/\/www.inogic.com\/blog\/2020\/02\/programmatically-validate-pre-post-plugin-step\/"}],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/22888","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=22888"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/22888\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media\/22891"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=22888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=22888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=22888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}