Overview
In this article we want to allow users to convert a Quote to an Order and open the new Order record. The business requirements are as follows:
Rule # | Description |
---|---|
1 | Convert a Quote into an Order with the click of a button. |
2 | Any Quote Products related to the Quote to be converted into Order Products. |
3 | The newly created Order to be opened |
The North52 Decision Suite solution works like this:
- A Formula is set up on the Quote entity that
- Converts a Quote into an Order
- Converts all the Quote Products into Order Products as well
- Opens the new Order
- A Quick Ribbon is created which triggers the above Formula
Set up Formula and Quick Ribbon
Formula
- Create a new Formula, setting the following values in the Formula Guide:
- Source Entity set to Quote
- Set Formula Type to Action
- Select the Classic Formula editor
- Change the Name of the Formula to Convert Quote to Order
- Copy and paste the following into the Formula editor:
Smartflow( iftrue([quote.statecode]= 0, UpdateRecord('quote', [quote.quoteid], SetAttributeStatus( 1 , 3)) ), UpdateRecord('quote', [quote.quoteid], SetAttributeStatus( 2 , 4)), SetVar('newOrder',ConvertQuotetoSalesorder([quote.quoteid])), OpenEntityForm('salesorder',GetVar('newOrder')) )
- Click Save
Quick Ribbon
For steps on how to add a Quick Ribbon please see this article.
Testing
To test this, open up a Quote with Quote Products and click the Quick Ribbon button: