Answered by:
How to access Subject, NoteText in a plugin which will fire on Create CRM 2011

Question
-
Hi Techies,
I am trying to create plugin which should copy the note to particular Object Id's Parent Object on create of Note.
I want this plugin to fire on create of Note. once it is started i want to capture Object Id , Subject , NoteText from the Input Paramters.
Here is the code what i have written.
entity = (Entity)context.InputParameters["Target"];
EntityReference _ObjectId = (EntityReference)entity.Attributes["objectid"];
NoteSubjectFromCall = context.InputParameters["subject"].ToString();
NoteTextFromCall = context.InputParameters["notetext"].ToString();Will it work? If not , Can any one suggest me code snippet.
Thanks,
Sreeni Pavalla
- Edited by Sreenivasulu Pavalla CRM Friday, April 6, 2012 1:01 PM
Friday, April 6, 2012 12:59 PM
Answers
-
Write the following:
Entity entity = (Entity)context.InputParameters["Target"]; EntityReference _ObjectId = (EntityReference)entity.Attributes["objectid"]; string NoteSubjectFromCall = entity ["subject"].ToString(); string NoteTextFromCall = entity ["notetext"].ToString();
My blog : http://mscrmtools.blogspot.com
Did you try the new CrmDiagTool for Microsoft Dynamics CRM 2011 ? If not, follow me
Upgraded tools for Dynamics CRM 2011!
View Layout Replicator | Searchable Property Updater | Ribbon Browser | SiteMap Editor | JavaScript Web Resource Manager | Role updater- Marked as answer by Sreenivasulu Pavalla CRM Friday, April 6, 2012 1:03 PM
Friday, April 6, 2012 1:01 PMModerator
All replies
-
Write the following:
Entity entity = (Entity)context.InputParameters["Target"]; EntityReference _ObjectId = (EntityReference)entity.Attributes["objectid"]; string NoteSubjectFromCall = entity ["subject"].ToString(); string NoteTextFromCall = entity ["notetext"].ToString();
My blog : http://mscrmtools.blogspot.com
Did you try the new CrmDiagTool for Microsoft Dynamics CRM 2011 ? If not, follow me
Upgraded tools for Dynamics CRM 2011!
View Layout Replicator | Searchable Property Updater | Ribbon Browser | SiteMap Editor | JavaScript Web Resource Manager | Role updater- Marked as answer by Sreenivasulu Pavalla CRM Friday, April 6, 2012 1:03 PM
Friday, April 6, 2012 1:01 PMModerator -
Thank you for your Quick Reply Tanguy.
I have another question like, If i want to register a plugin in the server, I should copy xrm dll's in to GAC. As of now i do not have VS 2010 tools installed in the server.
Is there anyway that i can Xrm dll's to GAC by using the command prompt.
And also do i need to install VS 2010 professional to get VS 2010 tools or Installing SDK will server the purpose?
Thank you
Sreeni Pavalla
Friday, April 6, 2012 1:07 PM -
You don't have to add any dll in the GAC of CRM 2011 server... Just register your plugins using PluginRegistrationTool
My blog : http://mscrmtools.blogspot.com
Did you try the new CrmDiagTool for Microsoft Dynamics CRM 2011 ? If not, follow me
Upgraded tools for Dynamics CRM 2011!
View Layout Replicator | Searchable Property Updater | Ribbon Browser | SiteMap Editor | JavaScript Web Resource Manager | Role updaterFriday, April 6, 2012 1:08 PMModerator -
Tanguy,
I have registered an assembly with out adding Dependency assemblies into GAC. But it throws a error saying that xrm dll is missing.
Please find the below screenshot of SDK which will tell that Dependency assemblies should be copied to GAC.
Thanks and let me know if i am misisng anything.
Sreeni Pavalla
Friday, April 6, 2012 1:14 PM -
Dependant DLL are the one that are not Xrm ones. These ones are already available (indeed, CRM is installed on the server)
I mean, I never had to register any Xrm dll in the GAC
What is the exact error message?
My blog : http://mscrmtools.blogspot.com
Did you try the new CrmDiagTool for Microsoft Dynamics CRM 2011 ? If not, follow me
Upgraded tools for Dynamics CRM 2011!
View Layout Replicator | Searchable Property Updater | Ribbon Browser | SiteMap Editor | JavaScript Web Resource Manager | Role updaterFriday, April 6, 2012 1:46 PMModerator -
Tanguy,
Please look at the below image, that is the error what i am getting.
.
Thanks
Sreeni Pavalla
Friday, April 6, 2012 2:30 PM