+ Start a Discussion

Workflow Rule Help

Hi everyone:

   Basically I have a workflow rule that fires off when a new record is created and the criteria is met. Criteria pretty simple, if Amount is not equal NULL then it is a field update.


The thing is, if the users hit Clone then I do not want the field to update through the workflow rule.


The users when they clone something, they would like to place in a sales rep id and not have it over written by the workflow rule....


Anyone, has any suggestions?




To the best of my knowledge there is no "isCloned" method you could utilize within Apex to achieve this goal.  However, as a workaround you could hide the built-in Clone button and create your own.  You would need to add a flag field to your object such as "isClone" that is set to true by your customized clone button for all records it creates.  You would then have to update your workflow criteria with an if statement that ensures the "isClone" flag is set to false. 


Alternatively the "isClone" field could instead be a global variable that is set to true by your customized Clone button.  Then you could leave your workflow rule criteria unchanged but alter the code it executes such that it checks the value of this global variable-if it is true it can set it back to false and quit but if it is false it can leave it unchanged and update the field as usual.


This is not ideal as you should always utilize Salesforce built-in functionalities whenever possible, but it is the first solution that comes to mind...