cancel
Showing results for 
Search instead for 
Did you mean: 

How can I lock down work order fields based on Order Status?

Roast Chef
Roast Chef

How can I lock down work order fields based on Order Status?

Jump to solution


For example, once a work order status is changed "Closed", I want to restrict edits to admin only.  Is this possible?  Thanks!

1 Solution

Accepted Solutions
Highlighted
Retired
Retired

Re: How can I lock down work order fields based on Order Status?

Jump to solution

Hi Dan,

Please try this validation rule Error Condition Formula:

AND( $Profile.Name = 'Fluid ServiceMax Service Manager', ISPICKVAL(PRIORVALUE(SVMXC__Service_Order__r.SVMXC__Order_Status__c), 'Closed') )

If you need to block all users except those whose profile is 'Fluid ServiceMax Service Manager', try this:

AND( NOT($Profile.Name = 'Fluid ServiceMax Service Manager'), ISPICKVAL(PRIORVALUE(SVMXC__Service_Order__r.SVMXC__Order_Status__c), 'Closed') )

Regards,

Meenakshi.

View solution in original post

Highlighted
Employee
Employee

Re: How can I lock down work order fields based on Order Status?

Jump to solution

Dan,

It depends on how your technicians are accessing ServiceMax (iPad or Browser).  An easy way would be to create a validation rule that excludes System Administrator profiles.  If you limit all editing to SFM's I would build criteria into the Wizard Step to prevent editing if the WO is closed. 

Highlighted
Roast Chef
Roast Chef

Re: How can I lock down work order fields based on Order Status?

Jump to solution

Thanks Stephen.  We do not limit editing to SFM's - we do have edit capabilites on the standard page layouts.  So how would I essentially make all fields read only if the Order Status of the work order is "Closed".  Struggling with the "value if true" string.  Thanks!

0 Likes
Reply
Highlighted
Sushi Chef
Sushi Chef

Re: How can I lock down work order fields based on Order Status?

Jump to solution

One way would be to create a new page layout of your existing record. Except in this layout you would have all fields as read only. This new layout would be triggered by your WO hitting closed status. Then you can restrict the editing based on profile by granting read-only access to everyone except for you Sys Admins.

Highlighted
Employee
Employee

Re: How can I lock down work order fields based on Order Status?

Jump to solution

You can create a Validation rule like the example below so only the System Admin will be able to make edits. This is an example for a Part Order which looks at the users profile and the Order Status.  Good luck!!  This will work for Mobile apps (i.e. iPad, MFL, iPhone, and Android) because they will get a sync error when the validation rule prevents the record from saving.

Part Order Validation Rules:

Validation Rule #1:

Description: This validation rule will now allow a parts order to be changed by a user with the TIS Field Service Profile after the parts order has been submitted.

TEXT:

AND($Profile.Name = "TIS Field Service", NOT(OR(TEXT(SVMXC__Order_Status__c) = "Approved", ISBLANK(TEXT(SVMXC__Order_Status__c)))), ISCHANGED( LastModifiedDate))

validatonrules‌ sysadmin‌ workorders‌ orederstatus‌

Highlighted
Roast Chef
Roast Chef

Re: How can I lock down work order fields based on Order Status?

Jump to solution

I think we're getting closer:

AND($Profile.Name = "Fluid ServiceMax Service Manager", NOT(OR(ISPICKVAL( SVMXC__Service_Order__r.SVMXC__Order_Status__c ,"Closed"),  ISPICKVAL (SVMXC__Service_Order__r.SVMXC__Order_Status__c,"" ))), ISCHANGED(LastModifiedDate))

Unfortunately, when I login as a user with the profile above, I can still change and save fields when the Work Order status is Closed.

Thoughts?

Highlighted
Retired
Retired

Re: How can I lock down work order fields based on Order Status?

Jump to solution

Hi Dan,

Please try this validation rule Error Condition Formula:

AND( $Profile.Name = 'Fluid ServiceMax Service Manager', ISPICKVAL(PRIORVALUE(SVMXC__Service_Order__r.SVMXC__Order_Status__c), 'Closed') )

If you need to block all users except those whose profile is 'Fluid ServiceMax Service Manager', try this:

AND( NOT($Profile.Name = 'Fluid ServiceMax Service Manager'), ISPICKVAL(PRIORVALUE(SVMXC__Service_Order__r.SVMXC__Order_Status__c), 'Closed') )

Regards,

Meenakshi.

View solution in original post

Highlighted
Roast Chef
Roast Chef

Re: How can I lock down work order fields based on Order Status?

Jump to solution

Thank you Meenakshi, Mike and Josh.  Appreciate the input.  Took a little from everyone's post.  Here was the final solution:

AND(NOT($Profile.Name = "ServiceMax Admin"), ISPICKVAL(PRIORVALUE(SVMXC__Order_Status__c) ,"Closed"))

Greatly appreciate the help.  Hopefully soon and with more knowledge everyday, I can start returning the favors!

Highlighted
Employee
Employee

Re: How can I lock down work order fields based on Order Status?

Jump to solution

Hi Dan,  Sorry, the example I provided I should have removed the ISCHANGED() because you don't need that in your formula.

Highlighted
Roast Chef
Roast Chef

Re: How can I lock down work order fields based on Order Status?

Jump to solution

Not a problem - all led me down the correct path.  So I can't give out "correct answer" credit to everyone on the thread huh?  Thanks again!

Highlighted
Retired
Retired

Re: How can I lock down work order fields based on Order Status?

Jump to solution

Hi Dan,

Glad to know you got the solution!

I did use 'SVMXC__Order_Status__c' in my test org when I confirmed the formula on Work Order object, but thought you might be trying this on Parts Order object. So I copied the field's API name from your formula. Guess I should have explained it. However, all's well that ends well!

Regards,

Meenakshi.