0

Hi I have an issue where in when I create a QuoteLineItem, it triggers a Quote validation rule. Which is fine but the error message is different. It should trigger the validation rule message

Cannot edit quotes that are For Approval or Pending

but the error being returned is

Item 1 has errors. An error occurred while trying to update the record. Please try again.

when I'm trying to create a QuoteLineItem.

There is a roll up summary field in the parent object that is being updated every time a QuoteLineItem is inserted. Is this the cause of the issue? and how can i resolve this one?

So basically it's like this.

Scenario A : WRONG

Quote - Validation Rule A - Active - Getting hit.
Error Message when Creating QuoteLineItem

'Item 1 has errors. An error occurred while trying to update the record. Please try again.' - WRONG

QuoteLineItem - validation rule A - Active Getting Hit. Error Message when Creating QuoteLineItem

'Item 1 has errors. An error occurred while trying to update the record. Please try again.' - WRONG

Scenario B : CORRECT

Quote - Validation Rule A - inactive- Getting hit. Error Message when Creating QuoteLineItem

'Item 1 has errors. An error occurred while trying to update the record. Please try again.' - WRONG

QuoteLineItem - validation rule A - Active Getting Hit. Error Message when Creating QuoteLineItem

'Cannot modify line items for a Master Quote Alternative that is not in Draft status' - CORRECT.

I'm thinking of trying to change the validation rule on Quote but I'm not sure if I'm gonna affect some business process. Is there any workaround for this one?

2
  • Have you checked the Debug Logs or analyzed the reason for receiving the error 'Item 1 has errors. An error occurred while trying to update the record. Please try again.' in the first place. As per the Salesforce Order of Execution, System Validations execute before User-defined custom validations, assuming you are adding a quote line item from a standard UI page. I suspect the initial failure in updating the record, does not comply with the system validations causing it to fire before your custom validation rule.
    – Jigar Shah
    Commented Aug 24, 2018 at 9:55
  • Its not very clear as what are your validation rules. Without taking a look at that, it will be not very helpful for anyone to provide any direction here. You may like to edit your question and then provide the validation rules and minimum code for anyone to look and help.
    – Jayant Das
    Commented Aug 24, 2018 at 16:45

0

You must log in to answer this question.

Browse other questions tagged .