Answered by:
Delete Product from Quote using WebService in Dynamics CRM 4.0

Question
-
I have a Quote in CRM 4.0 and 4 products associated to it. Now I want to delete one of the product from the quote via WebService, can anyone please help me as to what entity instance should I use and how do I remove that product.
PiyushMonday, September 12, 2011 4:48 AM
Answers
-
Hi,
You can delete the Quote Product (quotedetail) entity records via CRM Web Service delete request i.e.
CrmServiceObj.Delete("quotedetail", new Guid("{8FE5091C-87CC-E011-9998-FAA9D340D59D}"));
You can retrieve the quotedetail GUID via Quote Id by CRM Webservice RetrieveMultiple request (http://msdn.microsoft.com/en-us/library/bb929002.aspx), you can retrieve the records by Qoute Id.
Jehanzeb Javeed
http://worldofdynamics.blogspot.com
Linked-In Profile |CodePlex Profile
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".- Proposed as answer by Jehanzeb.Javeed Monday, September 12, 2011 6:23 AM
- Marked as answer by Piyush Paliwal Monday, September 12, 2011 9:03 AM
Monday, September 12, 2011 6:23 AM
All replies
-
The entity you need is the quotedetail entity, and you should be able to delete instances of this entity using the Delete message in the same way as most other CRM entities
Microsoft CRM MVP - http://mscrmuk.blogspot.com http://www.excitation.co.uk- Edited by DavidJennawayMVP, Moderator Monday, September 12, 2011 5:03 AM
- Proposed as answer by HIMBAPModerator Monday, September 12, 2011 6:29 AM
Monday, September 12, 2011 5:03 AMModerator -
This means that whenever a new product is added to a quote then a new instance of QuoteDetail entity is created, and what you are saying is that I get that instance from the productid and delete that particular instance of the entity.
PiyushMonday, September 12, 2011 5:25 AM -
Hi,
You can delete the Quote Product (quotedetail) entity records via CRM Web Service delete request i.e.
CrmServiceObj.Delete("quotedetail", new Guid("{8FE5091C-87CC-E011-9998-FAA9D340D59D}"));
You can retrieve the quotedetail GUID via Quote Id by CRM Webservice RetrieveMultiple request (http://msdn.microsoft.com/en-us/library/bb929002.aspx), you can retrieve the records by Qoute Id.
Jehanzeb Javeed
http://worldofdynamics.blogspot.com
Linked-In Profile |CodePlex Profile
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".- Proposed as answer by Jehanzeb.Javeed Monday, September 12, 2011 6:23 AM
- Marked as answer by Piyush Paliwal Monday, September 12, 2011 9:03 AM
Monday, September 12, 2011 6:23 AM -
Hi Piyush,
Check this link http://msdn.microsoft.com/en-us/library/bb928996.aspx
Mahain : MS CRM FreelancerMonday, September 12, 2011 6:32 AMModerator