Answered by:
To fire plugin when opening mscrm

Question
-
Hi guys,
My requirement is to send alert mail to all the accounts with some specific conditions, So I decided to write a plugin when any user opens mscrm web but I am not aware of what message and entity to use. I have registered it while opening an existing account but thay need it to be written only when opening. please guide me (boopeshbabud@zsl.com)
Thanks in advance
Wednesday, September 7, 2011 2:35 PM
Answers
-
Following are the messages when a user tries to retrive the records /access views.
context.MessageName == "RetrieveMultiple"
context.MessageName == "Retrieve"
Please check whether this fits your scenario.
You may be able to register this to entity(s) that you know the user would access (account ?) and have your email logic.
- Marked as answer by Boopesh dhandapani Thursday, September 8, 2011 7:02 AM
Wednesday, September 7, 2011 4:00 PM -
There isn't really a message to latch onto for a plugin I am afraid. You could have a script in a dashboard that fires when the dashboard is loaded and calls a web service on the same server to perform operations in .net, or if the dashboard is exposing a web application it could perform operations in .NET on it's own even.
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!- Proposed as answer by Jamie MileyModerator Wednesday, September 7, 2011 2:41 PM
- Marked as answer by Boopesh dhandapani Thursday, September 8, 2011 7:46 AM
Wednesday, September 7, 2011 2:41 PMModerator
All replies
-
There isn't really a message to latch onto for a plugin I am afraid. You could have a script in a dashboard that fires when the dashboard is loaded and calls a web service on the same server to perform operations in .net, or if the dashboard is exposing a web application it could perform operations in .NET on it's own even.
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!- Proposed as answer by Jamie MileyModerator Wednesday, September 7, 2011 2:41 PM
- Marked as answer by Boopesh dhandapani Thursday, September 8, 2011 7:46 AM
Wednesday, September 7, 2011 2:41 PMModerator -
hi jamie, Thanks for the reply its a good idea. Jus now I searched in the web crm and it has an option to customize the dashboards. And I think it will workout as you say we can call a web application using the java script when the dashboard is loading. But I am not aware of java script in dashboards, I could see many dashboards in the customization form.Could you please tell me how to call the java script when dasboards are loaded?Wednesday, September 7, 2011 2:53 PM
-
If you want to use jscript your dashboard can just expose an uploaded html page that is hosted inside CRM as a web resource. If you want to use an ASP.NET app you will have to host it in at least a different app pool and web application, but you can host it on the same IIS server.
Basically a dashboard supports exposing any web app through Iframe or also embedded web resources which can be a number of file types like embedded silverlight xap apps or static html pages which support javascript. Play around with creating a new dashboard and you will see what I mean.
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!- Proposed as answer by Jamie MileyModerator Wednesday, September 7, 2011 3:06 PM
Wednesday, September 7, 2011 3:06 PMModerator -
Following are the messages when a user tries to retrive the records /access views.
context.MessageName == "RetrieveMultiple"
context.MessageName == "Retrieve"
Please check whether this fits your scenario.
You may be able to register this to entity(s) that you know the user would access (account ?) and have your email logic.
- Marked as answer by Boopesh dhandapani Thursday, September 8, 2011 7:02 AM
Wednesday, September 7, 2011 4:00 PM -
Thanks a lot Shiju. It worked perfectly for my scenario, I have been messing up with this for some time and thought of asking in this forum for the first time. U guys really help beginners like us and this is going to be my first place to ask for any doubt in futureThursday, September 8, 2011 6:38 AM
-
Thanks a lot jamie..I got some ideas to work around dashboard and will use it up when needed.Will play around scripts in dashboard and ask here for any helpThursday, September 8, 2011 6:40 AM
-
If you got your answer, please mark one or more of them as the answer. Thank you
My blog : http://mscrmtools.blogspot.com
All my tools for Dynamics CRM 4.0 on my dedicated site: MSCRMTools Repository
Upgraded tools for Dynamics CRM 2011!
View Layout Replicator for Microsoft Dynamics CRM 2011
Searchable Property Updater for Microsoft Dynamics CRM 2011
Ribbon Browser for Microsoft Dynamics CRM 2011
SiteMap Editor for Microsoft Dynamics CRM 2011
JavaScript Web Resource Manager for Microsoft Dynamics CRM 2011Thursday, September 8, 2011 7:00 AMModerator