开发者

Adding an external link in entity views in CRM 4.0

开发者 https://www.devze.com 2023-02-18 05:48 出处:网络
In CRM 4.0, I would like (if possible) to open an external link directly from a view of several entities (for example \'My accounts\'). When this action is taken, a new browser window with a parameter

In CRM 4.0, I would like (if possible) to open an external link directly from a view of several entities (for example 'My accounts'). When this action is taken, a new browser window with a parameterized url should open into an external system. Ideally either a link on the record row, a toolbar button in the view or an action in the 'More actions' list. Is this possible?

I imagine this would be a javascript somewhere, but I am no开发者_JS百科t sure about the extension point (ISV.config?) as there is no form loaded in the view. This is not related to associated views.


Its possible by modifying the ISV.config (XML). http://msdn.microsoft.com/en-us/library/cc150910.aspx

You'll want to look at adding an entry your entity under the following xpaths (account example shown)

/ImportExportXml/Entities/Entity[name='account']/Grid/MenuBar/ActionMenu or /ImportExportXml/Entities/Entity[name='account']/Grid/MenuBar/Button

Example in SDK is:

<!-- The main Global Menu Bar located at the top of all root level areas -->
<MenuBar>
   <!-- Custom Menus that appear between the Goto Menu and the Help Menu -->
   <CustomMenus>
      <Menu>
        <Titles>
          <Title LCID="1033" Text="ISV" />
         </Titles>
         <MenuItem Url="http://www.microsoft.com" >
           <Titles>
             <Title LCID="1033" Text="New Window" />
           </Titles>
         </MenuItem>
      </Menu>
   </CustomMenus>
</MenuBar>

The MenuItem node supports a JavaScript attribute (make sure you XML encode your javascript).

Not sure what you want to parameterize to your url. If you use a modal dialog, the selected records in the grid are passed as dialogArguments on the window. Remember that IE has a maximum URL length if you were planning on passing many selected GUID's by query string. Full MSDN example: Walkthrough: Capturing the GUID Values of Records Selected in a Grid

0

精彩评论

暂无评论...
验证码 换一张
取 消