serving the solutions day and night

Pages

Thursday, December 6, 2012

Creating Custom Action in External Content Type (ECT) - SharePoint 2010.

How to create  External Content Type (ECT), See the below blog up to points 12,
http://makdns.blogspot.com/2012/12/integrating-dynamics-crm-2011-data-into.html

The new action will not be available in existing external lists of that external content type. Only new external lists of the appropriate external content type will display the action in the shortcut menu.

If you create External List (Point 13) before create new action, the new action won't display.


Create New Action
  1. On the Central Administration Web site, in the Application Management section - > click Manage service applications -> Click Business Data Connectivity service.
  2. In the View group of the ribbon, click External Content Types.
  3. Point to the external content type, click the arrow that appears, and then click Add Action.
  4. On the Add Action page, in the Action Name box, type the name of the action.
  5. In the Navigate to this URL field, type the full URL.
  6. Click Yes under Launch the action in a new Web browser window (applies to External Data Web Parts only)
  7. Click Add Parameters
  8. Click OK to add the action.

Create External List
Follow Point 13 or Right Click the ECT and select the 'External List option'

Open SharePoint List, point to any list, click the arrow that appears, and then click 'Open in CRM'.

Open CRM Forms and Views
All entity forms and views are displayed in the main.aspx page. Query string parameters passed to this page control what will be displayed.

Open a new entity -
http://<server_name>/<organization_name>/main.aspx?etn=<logical_entity_name>&pagetype=entityrecord

Open a existing entity record
http://<server_name>/<organization_name>/main.aspx?etn=<logical_entity_name>&pagetype=entityrecord=entityrecord&id=%7B91330924-802A-4B0D-A900-34FD9D790829%7D
where the id is {91330924-802A-4B0D-A900-34FD9D790829}
opening and closing brackets “{” and “}” with “%7B” and “%7D”.

Open the Closed Opportunities view
http://<server_name>/<organization_name>/main.aspx?etn=<logical_entity_name>&pagetype=entitylist&viewid=%7b00000000-0000-0000-00AA-000010003006%7d&viewtype=1039
where the id is {91330924-802A-4B0D-A900-34FD9D790829} => %7B91330924-802A-4B0D-A900-34FD9D790829%7D

Query string parameters for the main.aspx page
ParameterDescription
etnThe logical name of the entity.
extraqsOptional for forms. This parameter contains encoded parameters within this parameter.
pagetypeentityrecord - Displays an entity record form.
entitylist - Displays an entity view.
idspecific entity record id
viewidRequired for views. This is the ID of the savedquery or userquery entity record that defines the view.
viewtype1039 - Use for a system view. The viewid represents the Id of a savedquery record.
4230 - Use for a personal view. The viewid represents the Id of a userquery record.

http://technet.microsoft.com/en-us/library/gg328483.aspx

No comments: