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
Maksim KholodnyMaksim Kholodny 

Validation rule for an Order with the status "Completed"

hello, community! I'm a newbie and I really need some help.
the Order object has values in the status field: "New", "Activated", "In Progress", "Received", "Finished", "Canceled".
The Order object has a field: Account Name, Order Owner, Order Start Date, Status, Opportunity, Ship To Contact, Order End Date, SLA Offers Date.

You cannot change a closed Order with the Finished status
I've tried using this formula, but it doesn't work:

AND(
ISPICKVAL(Status, "Finished"),

OR(
IS CHANGED(Status),
ISCHANGED( Account Id ),
ISCHANGED( OwnerId ),
ISCHANGED( Effective Date ),
ISCHANGED( OpportunityId ),
ISCHANGED( Ship To Contact Id ),
ISCHANGED( EndDate ),
ISCHANGED( SLA_Offers_Date__c )
)
)
Carolina W 2Carolina W 2
Hi! 
In validation rules you have to use the API name of the field. 
In your case, try to remove spaces:

AND(
ISPICKVAL(Status, "Finished"),
OR(
IS CHANGED(Status),
ISCHANGED( AccountId ),
ISCHANGED( OwnerId ),
ISCHANGED( EffectiveDate ),
ISCHANGED( OpportunityId ),
ISCHANGED( ShipToContactId ),
ISCHANGED( EndDate ),
ISCHANGED( SLA_Offers_Date__c )
)
)

Examples of validation rules (https://help.salesforce.com/s/articleView?id=sf.fields_useful_field_validation_formulas.htm&type=5)
Maksim KholodnyMaksim Kholodny
Thanks! when I wrote this post, I found an error
That's how it works:
AND( ISPICKVAL( PRIORVALUE( Status ) , "Finished"),
OR(
ISCHANGED(Status),
ISCHANGED( AccountId ),
ISCHANGED( OwnerId ),
ISCHANGED( EffectiveDate ),
ISCHANGED( OpportunityId ),
ISCHANGED( ShipToContactId ),
ISCHANGED( EndDate ),
ISCHANGED( SLA_Offers_Date__c )
)
)