function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kate StarostinaKate Starostina 

Need some help with workflow rules

We are implementing a third party CPQ (configure price quote) application.  This application has three main objects.  The Quote, Quote Line Item and the Quote Sub Line Item.  Imagine the Quote to be the entire car, the Quote Line Item would be the Honda Civic and Quote Sub Line Item would be GPS option.  The approval process rules run off of the Quote object.  What I am trying to do is to activate a workflow flag on the Quote object when a criteria is met on the Quote Sub Line Item.  

The example goes like this:

If Product ID GPS appears in the Qoute Sub Line Item, a custom field called GPS is checked true on the Quote Item object.
The next workflow rule is if custom field "GPS" is checked True on the Quote Item Object, check True on the custom field "GPS" on the Quote object.  I then have another rule that say if "GPS" is checked True on the Quote object, check True the Sales Support custom field on the Quote object.

My approval process rule then is if "Sales Support" is checked True, route to this person. 

I can't get this to work.

I'm thinking it's a workflow issues.  I am able to get to work going from the Quote Item to Quote objects then triggering the Sales Support flag.  I feel like maybe since I have three workflow rules there that I need something additional.  TIA.
Rajiv Bhatt 16Rajiv Bhatt 16
Hello!
 
If i understand this correctly, there is 1 to many relationship between all he objects i.e. One Quote can have multiple quote line items and one quote line item can have many Quote Sub Line Items. In this case, workflow rule will not help. Here is how can do this: 

1. If you have the product name/id (GPS) available on the quote sub line item, you can do a rollup on quote line item and get the count of such products in the roll up field. 
2. The checkbox on the quote sub line item would be a formula field which would look at the count in rollup field and would be checked if the count is >=1 (this could also be done via workflow)
3. In a similar way you could have a rollup count field on the quote which would count the number of quote line items which have the checkbox checked.
4. another formula checkbox field on the quote could be set as checked whenever the rollup count is >=1 (this could also be done via workflow)

Hope this helps.