Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

How to convert Email to Opportunity using SDK?

Posted on by Microsoft Employee

Hi,

I have created an 1 email using SDK now i wanted to convert that email to opportunity how to convert that?
can any one help me out in this?

I have created email using SDK in below way...

IEnumerable<ActivityParty> toList = new List<ActivityParty> { activityto };
IEnumerable<ActivityParty> fromList = new List<ActivityParty> { activityFrom };

//Create Email 

Email email = new Email();
email.to = toList;
email.from = fromList;
email.Id = OrganizationService.Create(email);

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to convert Email to Opportunity using SDK?

    Thank you Vikas for reply.

    But in Email entity page  there is direct option Convert Email to Opportunity.

    after conversion, email 'subject' taking as Opportunity name...

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to convert Email to Opportunity using SDK?

    You can create a lead if no account or contact exists with the same email address and then qualify it to create contact,account and opportunity. If either account or contact exists, create an opportunity directly and attach the account/contact to it.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans