function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Muhammad Kashif 17Muhammad Kashif 17 

Stop transfer opportunity to aonther contact if stagename is close won

Hi,

How to stop transfer of opportunity to another contact if stagename is 'Close Won' or 'Close Lost'. How can I do this ? Pleaase provide a soultion with Apex or process builder.
Deepu BDeepu B
Hi Kashif,

You could go with simply a validation rule.

IF( OR(ISPICKVAL( StageName , 'Closed Won'),ISPICKVAL( StageName , 'Closed Lost') ) , ISCHANGED( OwnerId ) , NOT(ISCHANGED(OwnerId)))

The above one will work for you.

Thanks,
Deepu