I have a field on case linked to an order that is present both in the case object and in the object order.
When the case field is true, the order field becomes true in a trigger (after insert or update). The case field cant be set to false after it has been set to true. I have written the following validation rule to do that: ISCHANGED(Field_c) && PRIORVALUE(Field__c) == true
But now I have to add this feature: when the field is set to true, another date field must be set to today date. Now my trigger is in after insert and upsert, therefore I cannot update the new case i am upserting.
I have 2 possible ways I believe: - modify the trigger leaving it in after mode and operating on the new case and updating the new case (is this acceptable?= - set the trigger in before mode but this way i would have to modify the validation rule cause it won't work anymore and i don't know how to fix it.
What do you suggest? Thanks