Hi,
I have a request to interface opportunity in CRM with web application on adding product lines.
Is there any way to add product to opportunity using c#? What are the steps?
Thanks.
*This post is locked for comments
You will have to create opportunity product entity records and attach the opportunity with the record.
Thanks mate, just figure out the code
Hi MarkoA,
This is "OpportunityProduct", you should take a look at SDK
If you want do this quickly, you can simply use XrmLibrary, and run codes below;
OpportunityProductHelper helper = new OpportunityProductHelper(_organizationService); //Add existing product helper.Add(Guid.Parse("opportunity record id"), Guid.Parse("product record id"), Guid.Parse("uom id"), 1); //Add manual product helper.Add(Guid.Parse("opportunity record id"), "Manual added product name", 1, 5);
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
HR-09070029-0 2
ED-30091530-0 1