-1

In sales orders I have 2 custom fields Qnty and Free Qnty and a checkbox Free Qnty Only. For orders, that have a number in Quantity it's possible to enter Free Quantity and the checkbox is set to false by default.

But if the checkbox Free Qnty Only is true, the Free Qnty should be uneditable. I know, that the field dependency can be set only between checkboxes and picklists, but maybe a validation rule would work here? Or is it only doable with an apex class?

1
  • 1
    I edited this for legibility. But this is exactly what validation rules are for. In your case, it would trigger on a save where the user tries to edit a record that has Free Quantity Only. Something like this: AND(ISCHANGED(Free Qnty),FreeQuantyOnly = true))
    – akarnid
    Commented Feb 17, 2023 at 9:16

1 Answer 1

0

You can create a validation rule that'll allow to edit the Free Qnty only if `Free Qnty Only' is not checked, as following-

AND(Free_Qnty_Only__c, ISCHANGED(Free_Qnty__c))

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .