{"id":84,"date":"2011-11-19T07:40:00","date_gmt":"2011-11-19T02:10:00","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=84"},"modified":"2024-04-11T12:42:47","modified_gmt":"2024-04-11T07:12:47","slug":"crm-2011-developer-toolkit","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2011\/11\/crm-2011-developer-toolkit\/","title":{"rendered":"CRM 2011 Developer ToolKit &#8211; 2"},"content":{"rendered":"<p>As mentioned in earlier blog Microsoft Dynamics CRM developers can now write custom code from within Visual Studio by using tools and can automatically deploy that code to the CRM from within the visual studio itself. In this part we walk through the development and deployment of Workflow and Web Resources<\/p>\n<p>&#8211; Open Visual studio 2010. New Dynamic CRM template will be installed as given in the below screen shot.<\/p>\n<p><a href=\"http:\/\/1.bp.blogspot.com\/-9uurNMrZy6M\/TseCH9PM8PI\/AAAAAAAAA_A\/zVcwVDMrlHI\/s1600\/1.png\"><img decoding=\"async\" src=\"http:\/\/1.bp.blogspot.com\/-9uurNMrZy6M\/TseCH9PM8PI\/AAAAAAAAA_A\/zVcwVDMrlHI\/s400\/1.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>The Toolkit supports the create, update, delete and deployment of Workflows (both XAML and custom workflow activities), Silverlight applications and other Web resources including Jscript and HTML.<\/p>\n<p><strong>Create and Deploy a Workflow Library:<\/strong><br \/>\nUse the following procedure to create and deploy a workflow library:<br \/>\n1. Select the Dynamic CRM 2011 Workflow Library project as given in the below screen shot<\/p>\n<p><a href=\"http:\/\/2.bp.blogspot.com\/-YNREmSh3f5w\/TseC2unSxqI\/AAAAAAAAA_M\/yTe5hbMfx1o\/s1600\/2.png\"><img decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-YNREmSh3f5w\/TseC2unSxqI\/AAAAAAAAA_M\/yTe5hbMfx1o\/s400\/2.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>2. User will be prompted for the following information. Specify the login information as well as Organization and the solution where you would like to deploy your components.<\/p>\n<p><a href=\"http:\/\/2.bp.blogspot.com\/-Ws62U-GT4_o\/TseDakLah-I\/AAAAAAAAA_Y\/zauTlVkaEOU\/s1600\/3.png\"><img decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-Ws62U-GT4_o\/TseDakLah-I\/AAAAAAAAA_Y\/zauTlVkaEOU\/s400\/3.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>3. In the workflow project, right-click the workflow project node and select <strong>Add<\/strong> and then select <strong>New Item<\/strong>.<br \/>\n4. In <strong>Add New Item \u2013 Workflow <\/strong>dialog box, in the <strong>Dynamics CRM <\/strong>group of installed templates select the <strong>Workflow Activity Class<\/strong> template as given in the below screen shot.<\/p>\n<p>Enter the <strong>Name<\/strong> of the class you would like to be generated, and then click <strong>Add<\/strong>.<br \/>\n5. In the <strong>Custom Workflow <\/strong>dialog box specify field values for your workflow activity according to the descriptions in the following table.<\/p>\n<p><a href=\"http:\/\/3.bp.blogspot.com\/-N1igrOR7mlM\/TseEBKChGFI\/AAAAAAAAA_k\/Fjwf2Es4g3M\/s1600\/4.png\"><img decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-N1igrOR7mlM\/TseEBKChGFI\/AAAAAAAAA_k\/Fjwf2Es4g3M\/s400\/4.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>6. Open the generated class and add your custom workflow business logic where indicated by the comment \/\/ TODO: Implement your custom Workflow business logic.. as given in the below screen shot.<\/p>\n<p><a href=\"http:\/\/2.bp.blogspot.com\/-6E5M0GBrPdI\/TseETQhrbcI\/AAAAAAAAA_w\/1MWceRgD2zU\/s1600\/5.png\"><img decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-6E5M0GBrPdI\/TseETQhrbcI\/AAAAAAAAA_w\/1MWceRgD2zU\/s400\/5.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>This action also updates the <strong>RegisterFile.crmregister <\/strong>in the CRM Package project to store the Workflow registration information as given in the below screen shot.<\/p>\n<p><a href=\"http:\/\/1.bp.blogspot.com\/-5gkSuAL928Y\/TseEtTnKtuI\/AAAAAAAAA_8\/7OL9G7XsmAM\/s1600\/6.png\"><img decoding=\"async\" src=\"http:\/\/1.bp.blogspot.com\/-5gkSuAL928Y\/TseEtTnKtuI\/AAAAAAAAA_8\/7OL9G7XsmAM\/s400\/6.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>7. In the <strong>Properties<\/strong> of the workflow project, on the <strong>Signing<\/strong> tab, check the <strong>Sign the assembly <\/strong>check box and set the strong name key file of your choice.<br \/>\nAt a minimum, you must specify a new key file name and do not protect your key file that uses a password.<br \/>\n8. Right-click the <strong>CRMPackage<\/strong> project and select <strong>Deploy<\/strong> as given below.<\/p>\n<p><a href=\"http:\/\/2.bp.blogspot.com\/-6DLDYjwFDi0\/TseFVaSnCUI\/AAAAAAAABAI\/ilkJtHNwRn0\/s1600\/7.png\"><img decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-6DLDYjwFDi0\/TseFVaSnCUI\/AAAAAAAABAI\/ilkJtHNwRn0\/s400\/7.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>This builds the dependent projects and deploys the workflow activity to the Microsoft Dynamics CRM server. Any subsequent changes to the workflow activity are reflected to the server during the build and deploy process.<br \/>\n9.Right- The Workflow activity that we have created gets added to the solution as given in the below screen shot.<\/p>\n<p><a href=\"http:\/\/1.bp.blogspot.com\/-dR_4vswT71I\/TseGQRXC4AI\/AAAAAAAABAU\/maUnDA1DLro\/s1600\/8.png\"><img decoding=\"async\" src=\"http:\/\/1.bp.blogspot.com\/-dR_4vswT71I\/TseGQRXC4AI\/AAAAAAAABAU\/maUnDA1DLro\/s400\/8.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>4) <strong>New Visual Studio Solution Template for Dynamics CRM 2011:<\/strong><br \/>\nWhen you use the <strong>New Visual Studio Solution Template for Dynamics CRM 2011 <\/strong>project template option to create a new solution, a Silverlight application project is created.<br \/>\nThe Developer Toolkit allows for the inclusion of multiple Silverlight application projects. The procedure to add a new Silverlight web resource consists of either adding a new or Silverlight application project or an existing Silverlight XAP file.<\/p>\n<p>To Create and Deploy a New Silverlight Web Resource<\/p>\n<p>1. In the Visual Studio solution explorer, right-click the solution and select <strong>Add<\/strong> and then select <strong>New Project<\/strong>.<br \/>\n2. In the <strong>Add New Project <\/strong>dialog box, select the <strong>Silverlight Application<\/strong> template, specify a name for the project and then click <strong>OK<\/strong>.<br \/>\n3. In the <strong>New Silverlight Application <\/strong>dialog box, clear the <strong>Host Silverlight application in a new Web site<\/strong> check box, and then click OK.<br \/>\n4. In the <strong>CrmPackage<\/strong> project right-click <strong>References<\/strong> and select <strong>Add Reference<\/strong>.<br \/>\n5. In the <strong>Add Reference <\/strong>dialog box, select the <strong>Projects<\/strong> tab and select the Silverlight application project you created. Click <strong>Add<\/strong> to add it to the <strong>Selected projects and components<\/strong> list and then click <strong>OK<\/strong>.<br \/>\n6. Right-click the new reference you added in the previous step and select <strong>Properties<\/strong>.<br \/>\n7. Specify the <strong>Description, Display Name,<\/strong> and <strong>Unique Name <\/strong>properties you want to use when you create the Silverlight web resource as given in the below screen shot<\/p>\n<p><a href=\"http:\/\/2.bp.blogspot.com\/-kJXZf2aAqdk\/TseIbzntmHI\/AAAAAAAABAg\/dbGhy7SB_Jc\/s1600\/9.png\"><img decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-kJXZf2aAqdk\/TseIbzntmHI\/AAAAAAAABAg\/dbGhy7SB_Jc\/s400\/9.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>8. When you are ready to deploy your Silverlight web resource, right-click the <strong>CrmPackage <\/strong>project and select <strong>Deploy <\/strong>from the context menu.<br \/>\n9 The Silverlight Project that we have created gets deployed to the solution as a .XAP file as given in the below screen shot.<\/p>\n<p><a href=\"http:\/\/3.bp.blogspot.com\/-YNfxzJ1sRCM\/TseI9xxGeBI\/AAAAAAAABAs\/RDo0uKPlto0\/s1600\/10.png\"><img decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-YNfxzJ1sRCM\/TseI9xxGeBI\/AAAAAAAABAs\/RDo0uKPlto0\/s400\/10.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>To Add and Deploy an Existing Silverlight Web Resource<\/p>\n<p>1. In the <strong>CRMPackage<\/strong> project, right-click the <strong>WebResources<\/strong> folder, and then click <strong>Add Existing Item<\/strong>.<br \/>\n2. In the <strong>Add Existing Item \u2013 CrmPackage <\/strong>dialog box, select the XAP file of the Silverlight applications that you want to add.<br \/>\n3. In the <strong>WebResources<\/strong> folder, right-click the Silverlight application, and then click <strong>Properties<\/strong>.<br \/>\n4. In the <strong>Properties<\/strong>, specify the Microsoft Dynamics CRM metadata attributes. This includes the <strong>Description, Display Name, Silverlight version<\/strong>, and <strong>Unique Name<\/strong>, that you want to use when you create the Silverlight Web Resource.<br \/>\n5. To deploy the Silverlight web resource, right-click the <strong>CrmPackage<\/strong> project and select <strong>Deploy<\/strong> from the shortcut menu.<\/p>\n<p>To Add an Existing Silverlight Web Resource to the Project<\/p>\n<p>1. In the <strong>CRM Explorer<\/strong>, expand the <strong>Web Resources <\/strong>folder and the Silverlight (XAP) to select the Silverlight web resource.<br \/>\n2. Right-click the Silverlight web resource and select <strong>Add to Packaging Project<\/strong> from the shortcut menu.<\/p>\n<p><strong>Working with Other Web Resources<\/strong><\/p>\n<p><strong>Note : The web resource types other than Silverlight web resources are added to the CrmPackage project.<\/strong><\/p>\n<p>1. In the <strong>CRMPackage<\/strong> project, right-click the <strong>WebResources<\/strong> folder and in the shortcut menu select <strong>Add <\/strong> and then <strong>New Item<\/strong>.<br \/>\n2. In the <strong>Add New Item \u2013 CrmPackage<\/strong> dialog box select one of the following file templates:<\/p>\n<p>\u2022 HTML Page<br \/>\n\u2022 Icon File<br \/>\n\u2022 JScript File<br \/>\n\u2022 Style Sheet<br \/>\n\u2022 XML File<br \/>\n\u2022 XSLT File<\/p>\n<p>3. In my case I have added HTML page and Script file. As soon as I completed with adding of these files, these files will be displayed in the CRM package as given in the below screen shot.<br \/>\n4. In the <strong>Properties<\/strong>, specify the Build Action to \u201c<strong>CRMWebResource<\/strong>\u201d to create web resource on build of the solution. Specify as <strong>Description, Display Name<\/strong>, and <strong>Unique Name<\/strong> properties you want to use when you create the web resource as given in the below screen shot.<\/p>\n<p><a href=\"http:\/\/2.bp.blogspot.com\/-5o4PnZBUxLE\/TsePg27JIuI\/AAAAAAAABA4\/7YIBIBAPZ-8\/s1600\/11.png\"><img decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-5o4PnZBUxLE\/TsePg27JIuI\/AAAAAAAABA4\/7YIBIBAPZ-8\/s400\/11.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>5. After adding these web Resource components all will be deployed in the solution as given in the below screen shot<\/p>\n<p><a href=\"http:\/\/4.bp.blogspot.com\/-vUNu0Y93b6s\/TseP0mH89aI\/AAAAAAAABBE\/vr2LqAcxAtM\/s1600\/12.png\"><img decoding=\"async\" src=\"http:\/\/4.bp.blogspot.com\/-vUNu0Y93b6s\/TseP0mH89aI\/AAAAAAAABBE\/vr2LqAcxAtM\/s400\/12.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As mentioned in earlier blog Microsoft Dynamics CRM developers can now write custom code from within Visual Studio by using tools and can automatically deploy that code to the CRM from within the visual studio itself. In this part we walk through the development and deployment of Workflow and Web Resources &#8211; Open Visual studio\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2011\/11\/crm-2011-developer-toolkit\/\">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":[39],"tags":[500],"class_list":["post-84","post","type-post","status-publish","format-standard","hentry","category-miscellaneous","tag-developer-toolkit"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/84","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=84"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}