Answered by:
how to call entity form from ribbon button?

Question
-
Hi all,
I want to call entity form from ribbon button, how to do that, like ribbon button to add new record in each entity form?
please advise,
thanks,
-Rory Glo.
Thursday, December 8, 2011 7:23 AM
Answers
-
Hi Rory,
Here is an example of adding a ribbon button to a form: http://msdn.microsoft.com/en-us/library/gg334341.aspx.
To open a new entity record, you can use the fact that CRM forms are Url Addressable Forms. So by passing in parameters to the main.aspx page you can open any form, view or dialog in CRM 2011: http://msdn.microsoft.com/en-us/library/gg328483.aspx
You can then use this url in either a Url action, or create a JavaScript web resource to open the url and reference it in a JavaScriptFunction action as Makarand suggests above.
Kind regards
Kirsten
- Proposed as answer by Philippe LEAL Friday, December 9, 2011 12:36 PM
- Marked as answer by pntr Thursday, December 15, 2011 4:50 AM
Thursday, December 8, 2011 9:38 AM
All replies
-
Use CommandDifintion tag to Define Action, you can either set URL or call JavaScript function and from function call window.open method
HTH<Actions> [<JavaScriptFunction /> | <Url /> ] </Actions>
MaKeer | myencounterwithcrm.wordpress.com | CRM2011 User Settings Utility | CRM2011 Lookup Preview | CRM2011 Lookup Attribute Mapping | CRM2011 TreeView Control (Beta)Thursday, December 8, 2011 8:32 AM -
Hi Rory,
Here is an example of adding a ribbon button to a form: http://msdn.microsoft.com/en-us/library/gg334341.aspx.
To open a new entity record, you can use the fact that CRM forms are Url Addressable Forms. So by passing in parameters to the main.aspx page you can open any form, view or dialog in CRM 2011: http://msdn.microsoft.com/en-us/library/gg328483.aspx
You can then use this url in either a Url action, or create a JavaScript web resource to open the url and reference it in a JavaScriptFunction action as Makarand suggests above.
Kind regards
Kirsten
- Proposed as answer by Philippe LEAL Friday, December 9, 2011 12:36 PM
- Marked as answer by pntr Thursday, December 15, 2011 4:50 AM
Thursday, December 8, 2011 9:38 AM -
Hi Kirsten,
thanks its very helpfuly.
-rory glo.
Thursday, December 15, 2011 4:51 AM