dottie: Any advice how this can be done?
Yes, the best way to do this would be to build a set of actions for the Text Change event on the Job Status drop down. I think you're familiar with copying a screen so I'll skip that step here. With a copy of the CRM_EditCustomer screen you want to look for the Payment & Job Info section, click edit on the Job Status drop down and jump to step 2 of 6. You'll notice the event here is Text Change - this means that whenever the text on this drop down changes, execute this set of actions. Here are the actions you'll want to add:
- Add a Retrieve Value From Table with the following options:
- From Table: Customer, from field: JobStatus
- Where field: RecordID, is Value From Session: Current- Screen Active RecordID
- Place value in: Action Result, call it jobStatusFromTable
- Add a Start Conditional Statement with the following options:
- Value 1: Value From Screen: Job Status is Equal to: Type In: Closed.
- Add a Start Conditional Statement with the following options:
- Value 1: Value From Session: User- Is Method Admin? Equal to: Type In: True
- Add a Enter Value Into Field On Screen with the following options:
- Update Field or Object: JobStatus
- Dropdown Attribute: Text
- With the Value: Action Result: jobStatusFromTable
- Then add 2 End Conditional Statements to close off action set.
To explain things a little more, the first action is getting the current JobStatus from the table and storing that in an Action Result to be used later. The next action is a conditional statement checking to see if the dropdown for JobStatus was changed to Closed. If this is true then my next conditional statement checked to see if the user is a Method Admin. If the user isn't a Method Admin then I use an Enter Value Into Field On Screen to switch the job status back to what it was.
I make the assumption above that only the Method Admin user is allowed to close a job - if this isn't the case then you'll need to adjust the actions for step 3 accordingly.
HTH,
~C