Workflow Integration with Tasks and Events in Opportunity DocType

Hello Frappe Community,

I’m working on the Opportunity DocType and need help setting up a workflow that involves Tasks and Events. My requirements are as follows:

  1. Link Tasks/Events to Opportunity: I want to link Tasks and Events to the Opportunity, so when clicked, it takes me to their details in their respective forms.

  2. Task/Event Completion Before Workflow Transition: The Opportunity should only move to the next state (e.g., Submitted, In Progress) if the related Task or Event is marked as Completed.

  3. Create Tasks/Events within Opportunity: I need to create Tasks and Events within the Opportunity and ensure the Opportunity progresses only after they are completed.

Questions:

  • How can I link and view Tasks/Events from the Opportunity form?

  • How can I enforce a condition that blocks workflow transition until the Task/Event is completed?

  • Is there a way to create Tasks/Events directly from the Opportunity form?

Any guidance on how to implement this would be appreciated!

Thank you!