09 Nov
Posted by: mitch in: Customization, Dynamics CRM, Unsupported
[unsupported]
One of my current projects has requirements to add toolbar buttons to allow the user to create a new, related Entity such as a phone call or appointment with a click of a button.
Buttons are added to the toolbar by modifying the isv.config.xml and inserting code similar to the following:
<Button Title="Phone Call" ToolTip="Create a phone call" Icon="/_imgs/ico_16_1071.gif" JavaScript="locAddRelatedTo(4210);" />
I would like to point out the JavaScript function locAddRelatedTo(). This will open a new window containing a new CRM Entity. The Entity being created is determined by the parameter passed to the function. The parameter is the ID of the Entity in question. In the above example, 4210 is the Entity ID for the Phone Call Activity. Substitute any valid Entity ID to create a new built-in or custom Entity.
10 Responses
Techy News » Blog Archive » Adding a toolbar button to create new, related entities
09|Nov|2007 1[…] Read the rest of this great post here […]
A CRM Riff : Mitch is doing the CRM customization thang again.
09|Nov|2007 2[…] CRM MVP Mitch Milam blogs about "Adding a toolbar button to create new related entities". One of the very popular features of the Microsoft Dynamics CRM platform is the extensibility support built into the product. Mitch's blog demonstrates that customization doesn't have to be hard. Filed under: Extensibility […]
MSDN Blog Postings » Mitch is doing the CRM customization thang again.
09|Nov|2007 3[…] CRM MVP Mitch Milam blogs about "Adding a toolbar button to create new related entities". One of the very popular features of the Microsoft Dynamics CRM platform is the extensibility support built into the product. Mitch's blog demonstrates that customization doesn't have to be hard. […]
Mitch Milam’s Microsoft Discussions » Blog Archive » Calling a custom JavaScript function from a custom toolbar button
09|Nov|2007 4[…] Speaking of toolbar buttons. Another common practice is to add a toolbar button that will perform some complex operation in JavaScript. Since you generally don't want the JavaScript itself inside your isv.config.xml file, you need a place to put it where it's easily maintained. How about in the Form's OnLoad event? […]
mwittemann
30|Nov|2007 5Mitch, one weird thing I've found when adding these buttons is that the exact function to call can sometimes be less than intuitive. For example, if you want to add an activity to an opportunity, and you want the activity's "Regarding" field to be pre-populated with the Opportunity, you need to call the locAddActTo(4210) function. You would think the locAddRelatedTo() function would make it related to the parent object, but it doesn't seem to work that way…
mitch
03|Dec|2007 6That is a great point Matt and not one I'm sure I have an answer for.
Mitch
Ibrahim
13|Apr|2008 7Mitch, Awesome post. I have same project regarding same needs (buttons on top).
Luis Fernando
12|Jun|2008 8Valeu, pela ajuda…
Muito bom este teu exemplo
Sarah
23|Jul|2008 9I need to add a phone call button in CRM 4.0. Please can you tell me if this works for CRM 4.0 and if this is the best way.
Thanks
Sarah
mitch
24|Jul|2008 10It should work, but I'd have to try it to be sure. I'll try and do that next week sometime.
Leave a reply
Search
Categories
Archives
Meta
Most Viewed
Tags
A design creation of Design Disease
Copyright © 2007 - Mitch Milam's Microsoft Discussions - is proudly powered by WordPress
InSense 1.0 Theme by Design Disease brought to you by HostGator Web Hosting.