locked
CRM 4 - EService Accelerator RRS feed

  • Question

  •  

    Hi to all the CRM MVPs,
            I wanted to ask about Eservice Accelerator in CRM 4.0;
    a. How to add Custom Entities in the Eservice Console in Settings Tab? ,
    b. How to add Custom Entities in the Customer Portal?
    I have gone through the Internet but I didn’t find any example or an article showing Custom Entities. If you could provide the steps to do, would be a great help.

     

    Thanks,
    Abbas(www.abs.ae).

    Sunday, January 18, 2009 3:17 PM

Answers

  • Abbas,

     

    You may want to post a question on the discussion tab of the codeplex site for the accelerators if you have not already.

    http://www.codeplex.com/crmaccelerators/Thread/List.aspx

     

    To make modifications and add Custom Entities you will need to have a working knowledge of the SDK and edit the source code in visual studio.

    Sunday, January 18, 2009 7:32 PM
    Moderator

All replies

  • Abbas,

     

    You may want to post a question on the discussion tab of the codeplex site for the accelerators if you have not already.

    http://www.codeplex.com/crmaccelerators/Thread/List.aspx

     

    To make modifications and add Custom Entities you will need to have a working knowledge of the SDK and edit the source code in visual studio.

    Sunday, January 18, 2009 7:32 PM
    Moderator
  • Hi Abbas ..


    am faciing the same problem how to add my new custom entity to the eService meta name space or to the consol

    please if u did have any help on that
    Saturday, November 21, 2009 6:18 PM
  • Hi,
    In the documentation with eService is a section how to do.
    If you will have any problems let me know.

    Much easier it is in PIA (Portal Integration) which based on the eService runtime. You can merge a code from eService with PIA.


    Adding Additional Entities

    To add an additional entity to the eService Accelerator, you will need to update the Accelerator Console to support the new entity and also add the necessary User Controls to pages in your existing Web site.

    Adding entities to the Accelerator Console

    Adding an additional entity to the Accelerator Console is pretty straight forward.  The following steps will guide you through accomplishing this:

     

    1. Open the eServiceAccelerator.Web.Configuration project in Visual Studio
    2. Open the EntityList.aspx.cs file
    3. Add the new entity’s logical name to the _entities List on line 10 of the EntityList.aspx.cs file
    4. Build the eServiceAccelerator.Web.Configuration.Deploy project
    5. Follow the deployment instructions in the Installation Guide to deploy your new files

     

    Adding an EntityGrid user control

    In this section we will walk you through an example of adding a grid to display Microsoft Dynamics CRM Opportunity records in your Web site.

     

    The following steps will guide you through adding the opportunity grid view page to your existing Web site:

     

    1. Open your existing Web site project containing the eService User Controls in Visual Studio
    2. Add a new Web Form named ViewOpportunities.aspx
    3. Add a Register directive to the newly created aspx page to register the EntityGrid control (see below for a sample Register directive).

    <%@ Register TagPrefix="msa"
                 TagName="EntityGrid"
                 Src="../Controls/EntityGrid.ascx" %>

    1. Add an EntityGrid control to your page. 

       <msa:EntityGrid ID="oppGrid" runat="server" />

    1. Configure the EntityGrid control in the code behind.

    Create a query expression that returns open opportunity records and set the Query property on the EntityGrid control to your QueryExpression.

     

    // create a new query

    QueryExpression query = new QueryExpression();

    query.EntityName = EntityName.opportunity.ToString();

     

    ColumnSet oppCols = new ColumnSet();

    oppCols.AddColumns("name", "estimatedvalue", "statuscode");

     

    query.ColumnSet = oppCols;

     

    // add a condition to only return active opportunities

    ConditionExpression stateCondition = new ConditionExpression();

    stateCondition.AttributeName = "statecode";

    stateCondition.Operator = ConditionOperator.Equal;

    stateCondition.Values = new object[] { 0 };

     

    FilterExpression filter = new FilterExpression();

    filter.FilterOperator = LogicalOperator.And;

    filter.Conditions.Add(stateCondition);

     

    query.Criteria.Filters.Add(filter);

     

    // set the Query property on the EntityGrid control

    this.oppGrid.Query = query;  

    1. Set the RecordUrl property of the EntityGrid to the URL of the page you want to open when the record is double clicked

    // set the url of the page you want to open when the record is double clicked

    this.oppGrid.RecordUrl = "EditOpportunity.aspx";

    1. Next we need to add some columns to the EntityGrid control

    // define the columns you want to display in the grid

    this.oppGrid.Columns.Add(new DataColumn("name"));

    this.oppGrid.Columns.Add(new DataColumn("estimatedvalue"));

    this.oppGrid.Columns.Add(new DataColumn("statuscode"));

    1. Once the columns are set, we can configure to the GridView control contained in the EntityGrid User Control and call the DataBind method.

    // style the EntityGrid

    this.oppGrid.InnerGridView.Width = Unit.Percentage(100);

    this.oppGrid.InnerGridView.Font.Names = new String[] { "Verdana, Arial, Helvetica, Sans-Serif" };

    this.oppGrid.InnerGridView.Font.Size = new FontUnit(".9em");

     

    this.oppGrid.InnerGridView.BorderColor = Color.FromArgb(229, 229, 229);

    this.oppGrid.InnerGridView.BorderWidth = Unit.Pixel(1);

     

    this.oppGrid.InnerGridView.CellPadding = 5;

    this.oppGrid.InnerGridView.GridLines = GridLines.Horizontal;

     

     

    // bind the data

    this.oppGrid.DataBind();

     

    Adding an EntityEditor User Control

     

     

    Note   This example assumes you have added “opportunity” to the _entities List as described in the “Adding entities to the Accelerator Console”.

     

     

    1. Open your existing Web site project containing the eService User Controls in Visual Studio.
    2. Add a new Web Form to your site named EditOpportunity.aspx
    3. Add a Register directive to the newly created aspx page to register the EntityEditor control (see below for a sample Register directive).

    <%@ Register TagPrefix="msa"

                 TagName="EntityEditor"

                 Src="../Controls/EntityEditor.ascx" %>

    1. Add an EntityEditor control to your page

    <msa:EntityEditor ID="oppEditor" runat="server" />

    1. Next we need to set some properties in the code behind.  We need to check to see if an “id” parameter was passed in the query string.  This will determine whether or not the control display an update or create form.  If an id was passed to the page, we will set the EntityId property on the EntityEditor control.

    string id = Request.QueryString["id"];

     

    if (!String.IsNullOrEmpty(id))

    {

        oppEditor.EntityId = new Guid(id);

    }

    1. We will also need to set the EntityName property on the EntityGrid control.

    oppEditor.EntityName = EntityName.opportunity.ToString() ;



    My Dynamics CRM Blog: http://bovoweb.blogspot.com
    • Proposed as answer by kgorczewski Saturday, November 21, 2009 8:29 PM
    Saturday, November 21, 2009 8:22 PM
  • Hi everybody,

    I had a custom entity Console Application Web and put under ISV file.

    I did the same to the written help document. But not work :(

    How can i add a custom entity to Console and Portal?

    Thanks.
    Tuesday, December 8, 2009 12:07 PM