+ Start a Discussion
QuiqueprQuiquepr 

problem with custom button retURL behavior...does not return to source record



I have created a custom button to create a new record in custom object from the case detail screen.  The relative URL also passes several case field values mapped to the custom object fields and then i close the url with the returl of the case.id to return the user to the originating case screen.  When i press save on the new custom object record, it return to the detail view of the just created custom object record and not the case, but If I cancel it responds correctly and returns to the case detail view ...any ideas?  I have done this many times in the past and has worked flawlessly.

here is the button definition:

name : Create TREQ
Display Type: displ in existing window w/out sidebar or header
Content Source: URL


a0P is the custom object (in this case a training request) that is based on the case but requires a separate record.

The other are the custom fields mapped - they do map correctly and show correctly ion the new record screen of the training request object.

The only issue is upon save it does not return to the to case.

I have place the button on the training request related list and onthe case detail button and still get the same results.  never had this happen before.

Button Code:

/a0P/e?CF00NA0000009MPqF={!Case.CaseNumber}
&CF00NA0000009MPqF_lkid={!Case.Id}
&CF00NA0000009MPqh={!Case.Account}
&CF00NA0000009MPqh_lkid={!Case.AccountId}
&00NA0000009U0wH={!Case.Category_Type__c}
&retURL=%2f{!Case.Id}


I have tried the various options of the display beahvior to no avail.
I have use the / or the encoded %2f as substitute for the backslash and still no success...

any help is rgeatly appreciated.

Tks,
Quique
sfdcfoxsfdcfox

retURL is ignored on the "New Record" page. You won't be able to use retURL to return to the original case.

Martha_SenetaMartha_Seneta

Maybe try using saveURL in addition to retURL.