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)

Workflow from Opportunity to Order

(0) ShareShare
ReportReport
Posted on by 3,460

I have an Opportunity that has a checkbox "Create Order" when the value is "YES" and the Status Reason is "Won" then it should create an ORDER.

All said all done, but the problem is, my Opportunity has Products. When i create an Order (automatically by Workflow) My order does not have any products!

How can i Solve this ?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Royal King Profile Picture
    27,686 on at

    There is no outbox workflow action that can automatically convert opportunity to order. You need to write custom workflow to convert opportunity to order.

    Here is the method that converts opportunity to order with all the products in the opportunity. Use this method in your workflow to convert opportunity to order.

    GenerateSalesOrderFromOpportunityRequest req = new GenerateSalesOrderFromOpportunityRequest();

    req.OpportunityId = new Guid("D911C1BD-23DA-E011-94B4-1CC1DEF177C2");

    req.ColumnSet = new ColumnSet(true);

    GenerateSalesOrderFromOpportunityResponse resp = (GenerateSalesOrderFromOpportunityResponse)slos.Execute(req);

  • Letoir Profile Picture
    3,460 on at

    i need to try this out! thanks

  • Suggested answer
    Aileen Gusni Profile Picture
    44,524 on at

    Hi Letoir,

    You dont have plan to use the sequence provided by out of the box crm, opportunity to quote to order to invoice? It will make the products brough along from opportunity to quote to order.

    Thank you.

  • Suggested answer
    Community Member Profile Picture
    on at

    Please let us know if you question was answered!

  • Letoir Profile Picture
    3,460 on at

    Yes But the company doesnt want to use Quotes... So it has to go from Opportunity to Order.

    But on order you find a button in the command bar that says "Get Products from opportunity", so this can make it work aswell :)

  • Letoir Profile Picture
    3,460 on at

    Hi Chitran, I did as u told me, but i need this class GenerateSalesOrderFromOpportunityRequest.

    Could u give me more details about this, as this is my first workflow activity.

    thanks

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi Letoir,

    If my suggestion, better you create a plugin.

    Register when onCreate of an Order.

    Get the Opportunity, get the Oportunity Product, and then create the Order Product based on the Opportunity Product.

    Thanks.

  • Letoir Profile Picture
    3,460 on at

    True, but the order is created 2 of the 4 times  on opportunity.

    Depending on the opportunity type, so its better to develop a workflow activity. no ?

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi Letoir,

    Custom workflow or Plugin,

    It is similar in usage if you use auto trigger.

    You want to run on demand or auto trigger during Order created?

  • Letoir Profile Picture
    3,460 on at

    When an Opportunity is qualified the order should be created.

    So you can say on field change: status reason, is qualified (won) an order should be made.

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