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
Ahmad HelalAhmad Helal 

Custom Button CancelURL

I have a custom button on the opportuntiy related list on the contact record as follows:
/setup/ui/recordtypeselect.jsp?ent=Opportunity&retURL=%2F{!Contact.Id}&save_new_url=/006/e?lookupcmpgn=1&cancelURL=%2F{!Contact.Id}&retURL=%2F{!Contact.Id}&ent=Opportunity&conid={!Contact.Id}&opp6={!Contact.LeadSource}&CF00N80000004cLg4={!Contact.Name}&CF00N80000004cLg4_lkid={!Contact.Id}
It is working as expected with 1 exception, if the user clicks "cancel" on the new opportunity record AFTER they've already selected the record type; it takes them back to the home screen instead of back to the orignating contact record. I've been playing around with the CancelURL and the retURL and I can't get it to work. The odd thing is if the user hits cancel on the record type selection screen it works as expected.