Microsoft Dynamics AX 2012 R3 for Retail-Development & Customization

Microsoft Dynamics AX 2012 R3 for Retail-Development and Customization

Locus IT ServicesMicrosoft Dynamics AX 2012 R3 for Retail-Development and Customization

Lesson 1: How to: Create SharePoint WebPart

How to: Create SharePoint WebPart

How to: Create SharePoint WebPart : Customers usually have a requirement to customize Out of Box SharePoint look and feel and provide custom functionality. In this lesson, we will look into creating custom WebPart using Visual Studio.

Lesson Objectives

To understand how to create a SharePoint webpart.

Steps to Create SharePoint WebPart

This topic provides step by step approach to create a custom WebPart using Visual Studio.

  1. Login into your development environment using Administrator privileges.
  2. Open Visual Studio -> Create New Project using “SharePoint Empty Project” template.
  3. Add New Visual WebPart as shown in the below screenshot. Name the visual WebPart as “MyCoolVisualWebPart”.
  4. Modify the newly added WebPart’s user control mockup as shown below.
  5. Update user controls code behind file to add label to the control.
  6. Update the webpart group name in Elements.xml. In this case update the group name to “Dynamics eCommerce”. This is going to be used during deployment
  7. Update *.webpart file with new title and description. This will be used during deployment to create webpart.
  8. Now build the project and deploy the WebPart in SharePoint Site collection. Once the WebPart is deployed, you should be able to see the WebPart in list of available WebParts.
  9. Now build the project and deploy the WebPart in SharePoint Site collection. Once the WebPart is deployed, you should be able to see the WebPart in list of available WebParts.
  10. Next step is to add a page. Browse to SharePoint Site collection and click on “Add a page” link available under Site settings icon as shown in the below screenshot.
  11. Edit the newly created page and set “Blank Web Part page” as the default page layout.
  12. Navigate to the newly created page and click edit. Scroll to web part zones below and click “Add a Web Part”. In the selection you should see your new web part. Select it and click add.
Locus IT Project Management Office
What’s it?