function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DekorDekor 

Milestone update trigger

I have two triggers in our production org that complete case milestones based on case status/isclosed.

The first trigger completes the "closed" milestone when the case.isclosed = true.  This is working correctly.

However my second trigger which completes the "responded" milestone when case.status = "New" or "Assigned" is firing regardless of status. 

Here is the trigger, I'm sure its something simple but I can't spot it. 
 
trigger completeRespondMilestone on Case (after update) {

    // Cannot be a portal user
    if (UserInfo.getUserType() == 'Standard'){
        DateTime completionDate = System.now();
            List updateCases = new List();
            for (Case c : Trigger.new){
                if (((c.Status != 'New')||(c.Status != 'Assigned'))&&((c.SlaStartDate 

 
DekorDekor
For some reason it is cutting off the rest of the trigger no matter how I post it however it sends:
 
((c.SlaStartDate 


 
DekorDekor
Ok, I think I've realised what it is.  Its because the "status" field on a case is a picklist, so I assume I have to use ISPICKVAL().  How would I use this in the NOT context,  eg.  NOT ISPICKVAL(status, "assigned").  Any variations just seem to give me errors.