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
});}}
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.
This field should have "Add assignee" text. try to inspect it using browser development tools and check if there are any errors in the console. If everything looks fine send email to support@bpmonline.com