I have a plugin that is sending some Opportunity data to another system of ours when certain fields in the opportunity are updated and then I save the id of this new record from this other system back into the opportunity. We have a workflow that runs when the status changes, it checks a few fields to verify they meet our requirements and if not, prevent the opp from going to the next sales stage. Sometimes, not always, this workflow is tripped when I do an update on the opp even though the only thing I've changed is adding this id to this opportunity. The sales stage never changes. These required fields are missing but since the sales stage never changes and technically, we don't require these fields until the user tries to move it to the next sales stage, this should pass this workflow. I've registered this plugin the /Post Operation/ pipeline stage because I want to make sure the opportunity is saved before this plug in runs. Is there something I can do so that my plugin bypasses this validation? Is there a better way I should be handling this scenario? Is there something I need to check with our required field validation when sales stage changes? I don't want to block the user form saving the opportunity, just want to be able to process some of the data after it's saved. Below is an example of my code.
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.