Answered by:
Update record of an entity using update (post operation) plugin of another entity in dynamics crm 2011

Question
-
Hello Friends,
I have want to create a plugin which will update two entities -
1. one it is created for
2. another entity
Owner of both entities is same. I want to know that which method or class will be useful for me to perform this operation when i am using Dynamics CRM 2011 Developer Toolkit.
please guide me how to start and what should I do.
Thanks
-- NMathurFriday, February 3, 2012 11:49 AM
Answers
-
you can update the entity you register your plugin service.Update. To update the other entity you need to use the service.Retrieve method to retrieve the entity and service.Update to update the entity.
Here is some sample code using developers toolkit. I am using a Create method in the blog but you can use the update to update the entity.
http://www.mscrmshop.blogspot.com.au/2012/01/step-by-step-plugin-tutorial-using.html
I hope this helps.
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com- Edited by Amreek Singh Saturday, February 4, 2012 7:22 AM
- Proposed as answer by Amreek Singh Tuesday, February 7, 2012 11:50 AM
- Marked as answer by nmathur Tuesday, February 7, 2012 11:52 AM
Saturday, February 4, 2012 7:21 AM
All replies
-
If you do not know how to write a plugin, you could study the sample code SDK$\samplecode\cs\plug-ins\plug-ins.csproj, especially the accountnumberplugin.cs file and followupplugin.cs and readme.doc
If you do not know how to register the plugin, you could refer the chapter "Walkthrough: Register a Plug-in Using the Plug-in Registration Tool" in sdk.
For the basic knowledge about plugin, please refer the chapter "Plug-in Development" in sdk
daemon linFriday, February 3, 2012 4:48 PM -
you can update the entity you register your plugin service.Update. To update the other entity you need to use the service.Retrieve method to retrieve the entity and service.Update to update the entity.
Here is some sample code using developers toolkit. I am using a Create method in the blog but you can use the update to update the entity.
http://www.mscrmshop.blogspot.com.au/2012/01/step-by-step-plugin-tutorial-using.html
I hope this helps.
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com- Edited by Amreek Singh Saturday, February 4, 2012 7:22 AM
- Proposed as answer by Amreek Singh Tuesday, February 7, 2012 11:50 AM
- Marked as answer by nmathur Tuesday, February 7, 2012 11:52 AM
Saturday, February 4, 2012 7:21 AM -
Hi Friends,
Thanks for your valuable suggetion.Amreek, I have worked according to your reply .. thanks again :)
-- NMathur
Tuesday, February 7, 2012 10:58 AM -
Could you please mark the post as answered?
Thanks
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com
Tuesday, February 7, 2012 11:51 AM