Polls are placed in a web page via the Poll Placement control, which will rotate randomly through all published, released Polls associated with the Poll Placement record in CRM referenced by the control. 

Poll placements display Polls, which are configured in Microsoft Dynamics CRM Web client. They are not client-side editable. Configuring Polls and Poll placements is the task of a content publisher; all the developer needs to do is put the Poll Placement control in a Page Template, set it's PlacementName property to the name of an existing Poll Placement record in the CRM.

Example Polls are configured in the Company Portal starter website. This Website has examples of a PollPlacement in it's master page in the sidebar.

Adding a Poll Placement to a Page Template

The following control declaration can be added to an ASP.NET page template in the Visual Studio Web Application project.

<adx:PollPlacement ID="Polls" PlacementName="Polls" runat="server"></adx:PollPlacement>

Properties

The PollPlacement control has several properties that can be specified to modify the behavior.

NameDescription
PlacementName The name of an existing Poll Placement record in CRM.
ShowClosedPolls A boolean value indicating whether or not to show polls that are closed (i.e. voting is no longer permitted). Default value is false.
Title The title to be displayed on the poll. Default value is "Quick".
SecondTitle The second title to be displayed on the poll. Default value is "Poll".
ViewResultsLinkLabel The label of the view results link displayed on the poll. Default value is "View Results".
ViewArchivesLinkLabel The label of the view archives link displayed on the poll. Default vaue is "View Archives". Requires PollArchiveSiteMarkerName.
TotalsLabel The label of the total votes displayed on the poll. Default value is "Total Votes".
PollArchivesSiteMarkerName The name of a Site Marker that is associated with the Web Page containing the archived polls. Default value is "Poll Archives". If the site marker does not exist, then the View Archives link will not be rendered.
PortalName The portal context configuration name that the control binds to.  Default value is unassigned.

Poll Archives

In order to render the archived polls, you will need to setup a new Web Page and a new Page Template in CRM and a new ASP.NET Page Template in your web project that queries and renders the archived polls. The Company Portal starter website contains a sample Page Template that can be copied to your project. The template can be found in the Adxstudio Portals installation directory C:\Program Files (x86)\ADXSTUDIO\XrmPortals\v.x.xxxx\Samples\CompanyPortal\Pages\PollArchives.aspx. You will also need to setup a Site Marker with the name "Poll Archives" that maps to the web page created for the poll archives page.

  Related Topics