As a User
I want to be able to generate an order from the level of opportunity
because I do not have time to paste the field values from the chance to order
Criteria:
The button in the opportunity record view is visible if the opportunity in the Closed Won stage.
The button takes us to the order creation view.
Completing the fields:
Opportunity
Contractor
Order Date = Expected Close Data
Value = Amount
Status = Draft
Is that possible? If yes, how can i do this?
Like
Hi Arkadiusz Polus,
Please feel free to check this Marketplace addons about the implementation of Copy Button functionality inside the opportunity record page. https://marketplace.creatio.com/app/buttons-opportunity-edit-page-creatio
In your case, You Can do this by writing a business process that Creates a order record and update the column values fetched from your opportunity.
Adding Buttons:
Business Process:
Then use PushHistoryState message to open the page of Order
var activeRow = this.get("ActiveRow"); if (activeRow) { /* Get the primary contact identifier. */ var primaryId = this.get("GridData").get(activeRow).get("PrimaryContact").value; if (primaryId) { /* Create an address string. */ var requestUrl = "CardModuleV2/ContactPageV2/edit/" + primaryId; /* Publish a message about updating the page navigation history and go to the primary contact page. */ this.sandbox.publish("PushHistoryState", { hash: requestUrl }); } }
BR,
Bhoobalan Palanivelu.
Hello Arkadiusz,
There is already a pre-configured process for the opportunity "CreateOrderFromOpportunity" that is realized as a button on the Opportunity page. There is a way to replace it with your own version and modification or to create a new process and link it to the opportunity page via the section wizard.
Business Process seems to be the most proper way to satisfy your needs.
"The button in the opportunity record view is visible if the opportunity is in the Closed Won stage" might be the only feature that can't be done OOTB in old UI, as it is not possible to hide Business Process under Actions or button by business rules. In this case a solution may be to add a validation in the very process if the opportunity is in the right stage and if not - show a waring pop up page to the user and terminate the process.
On the other hand it can be easily done in the new Freedom UI by using the condition setting (business rules). Please note that to use Freedom UI you will need to create a whole new section to replace the old one as the OOTB Opportunity page is not compatible with new UI.
"The button takes us to the order creation view." This one may be completed by a business process element "Open edit page". You may check CreateOrderFromOpportunity as an example
"Completing the fields"
Add data element is used here:
This is how the logic in CreateOrderFromOpportunity process is done. You are welcome to use it as an example for your own needs.
Best Regards,
Dan