web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How do I add items in the sub menu options through c#?

(0) ShareShare
ReportReport
Posted on by

I have an existing opportunity with some menu items as shown in the below image.

OppProductLine.jpg

I want to programatically add the product using a windows forms application.The existing product was added using Dynamics Online Portal. But, I need to do the same via c#.

After searching in the internet, I found out that we can achieve this by using Related Entities & calling Service.Execute(Request).

So first, I found out the entity names of the required.As I found the entity name for Motor Products, I used Service.Create(entity) to add the product. The product was added but it wasn't showing under this opportunity as I didn't pass the reference for this opportunity.

Then, I tried to find the relation between Opportunity and Product Line Items but I couldn't find any common unique attribute (ex: opportunityid is not there in Product Line Items). Ultimately, the application was throwing errors.

Is there any way we can add the product in the Motor Products programatically?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Andreas Cieslik Profile Picture
    9,267 on at

    Here is a sample with early bound:

    msdn.microsoft.com/.../gg509009.aspx

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans