1

I need a specific case (here: Queue) owner to fill a field when the case is reassigned back to another owner.

In other words: We get a case via email. We fill out the necessary fields and then transfer the case to a developer queue. These developers don't take over ownership but rather work inside the queue. After the solution they have to fill out a specific field before they can reassign the case back to the service rep.

My VR so far:

AND(
NOT(ISBLANK(Errorresolution_Firefighter__c)),
$Profile.Id = "XYZ"
)

But nothing happens no matter who get´s the case. What did I wrong?

Kind regards. Alex

1
  • 1
    You need to remove the NOT function from the field check,(assuming Profile.Id is that of the developer user.) In VR , you need to specify the error condition.
    – Rohit
    May 29 at 13:03

2 Answers 2

1

Assuming that you need the Validation rule to fire when developer users are assigning the Case back to service rep.

We specify error condition in validation rule. Below 2 conditions needs to be met for firing validation rule :

  1. Errorresolution_Firefighter__c field is blank
  2. Owner of Case is queue just before changing the owner back to service reps.

We just need to remove NOT function & add prior value check for ownerId same as that of queue from the rule as below :

AND(
  ISBLANK(Errorresolution_Firefighter__c),
  PRIORVALUE( OwnerId ) = 'queue-id'
)

Also check - Cross-Object owner fields

7
  • Thanks so far for the time and patience. Unfortunately nothing changed after I alter the VR. I still can switch ownership with the empty field. Also when login in as a "normal" user.
    – Alex M.
    May 29 at 16:49
  • ok , so your requirement is to prevent ownership change irrespective of the user who is the current owner?
    – Rohit
    May 29 at 16:56
  • 1
    @AlexM.: I understood the flaw in the solution. I've updated my answer with a working solution.
    – Rohit
    May 29 at 17:35
  • Thanks again. No, the ownership itself should be no problem. But once the developer queue got the case/ownership whatever they do with the case the specific field need to be filed out. I did a simple test and only made the field not blank without any modifications. Turns out nothing happens at all. So I need to dig somewhere else.
    – Alex M.
    May 29 at 19:07
  • 1
    Let us continue this discussion in chat.
    – Rohit
    May 30 at 4:27
1

Validation Rule:

  AND(

     LEN(Errorresolution_Firefighter__c) = 0,

     ISCHANGED(OwnerId),

     PRIORVALUE(OwnerId)='ownerId',

     NOT($Profile.Name='Profile Name')
)

Note: change owner Id and Profile name as per your org.

Rich text fields are a little wonky. ISNULL and ISBLANK don't work with this field type, period.

https://help.salesforce.com/s/articleView?id=000385791&type=1

You must log in to answer this question.

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