We have a Lead Approval Process that is triggered when the user sets the Lead Staus to "Submit For Approval". However, we have been experiencing a lot of records that are being sumbitted before they meet our submission criteria. Therefore, I would like to verify that the record meets these criteria when the user changes the Lead Status from "Research" to "Submit For Approval".
I've played around with Validation Rules, Approval Processes and Workflows, but I can't seem to figure out how to trigger the validation when the user changes the Lead Status field. At this time, I've got a validation rule that checks the record and throws an error, but it fires every time the record is edited. This makes it so that if the user edits the record, but is not ready to submit it, they potentially have to add some fake data in there just to save the record. Not a workable situation.
In short, I want my users to be able to edit a record as many times as they want, then when they are ready to trigger the approval, the lead is check to make sure certain criteria are met. If they are not, an error is given, and the Lead Status is not advanced. If it meets the criteria, the Lead Status is advanced and the record is saved.
Any thoughts?
답변 4개
Is the status " Submit for Approval" the actual criteria to trigger the approval process? And can you supply a sample of the code for the validation rule and the flow for the approval process?
If the status is what triggers the approval process then I think a validation rule that won't allow the user to select that status unless all other criteria is met is probably the best route to take, you can also add these to the approval criteria as well.
Optionally, you can use page layouts and record types to help your users through the steps: Basic page layout and a record type that doesn't have the "Submit for Approval" option. Then, once all of the "required" fields are completed and any other criteria is met your workflow can be triggered to change the record type to the "approval" record type which includes that value in the status so users cant even view it as an option until the system says they meet the requirements.