Opportunities can have multiple quotes.
So when you add a second quote to an opportunity, the second quote will not be part of a business process flow out of the box.
I tried to create a business process flow instance in a workflow.
My Workflow Definition:
After a new quote is created, count the number of workflow instances (with Workflow Tools) and if the number of business process flow instances is 0, then create a new business process flow instance.
My problem: The workflow seems to get fired BEFORE the out of the box business process flow instance is created by the business logic. So the count of instances in my workflow is always 0. That leads to the situation, that first my workflow creates an instance (because it looks as if there is none). And then the out of the box business logic also created the instance afterwards. Very annoying.
As a workaround I tried to have another workflow on the bpf instance that deletes the double instance, if the count is 0. But somehow i can not get it to work.
Any other ideas how to achieve that?
*This post is locked for comments