0

Essentially, I want a Product Rule that prevents the user from entering a term that is not equal to the term on the product, but I am unclear on how to set the error condition.

Can I use a cross object formula condition to accomplish this? Something like:

Tested Variable: Subscription Term

Operator: Not equal to

Filter Type: Value

Filter Value: Product__r.SBQQ__SubscriptionTerm__c

  • Are you trying to verify the term on a quote line item versus the term of the corresponding product? – cropredy Apr 1 at 18:00
0

Amelia,

You have a few options on how to manage this on the Opportunity Product or Quote Line Item records:

  1. A workflow rule that sets the Term field on the record to match the Term field value from the Product. You could then make the Term field read-only to non-admin/permissioned users. This would always keep the child record in sync with the Product record value (at the time the OppProduct / QuoteLine is placed.
  2. A validation rule that compares the value entered on the Opportunity Product/Quote Line Item to the Product value. This would result in an error message to the user that they couldn't get past, but it wouldn't necessarily SHOW the user what the Term value SHOULD be, so they'd need another way to figure that out if it's not obvious. Perhaps there could be a formula on the record that shows the expected value? Validation rules can also cause problems with other automations that may create OppProducts/Quote Lines automatically, so they take a little more care. Also, you'd probably want to determine some way to have your validation rule not apply to historical records or it will be enacted on all Save actions for older products, which could cause some confusion. Here's how you'd write that Validation Rule (using the enactment date):

AND(DATEVALUE(CreatedDate) > DATE(YYYY,MM,DD), Term__c<>PricebookEntry.Product2.Term__c)

Note that you have to use the PricebookEntry record to reach the Product record. The first "Term__c" is on your source object. If the Term field is a picklist on either record you'd adjust your formula with ISPICKVAL or TEXT Functions accordingly.

Both options allow you some flexibility in turning on/off your rules. Option 1 takes the Term field out of the user's hands, option 2 gives them the illusion of choice but forces them to be correct in the end.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.