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
Peter CowenPeter Cowen 

Cancel button takes you back to an incorrect record

I have a problem where on a custom object the cancel button takes you back to the incorrect record.

To get this I have a related list within a ticket and I press New which takes me in from a reference 00012 I then press cancel and it will take me back to a reference 00001. Is there a way of making the cancel button take you back to the correct ticket.

The buttons I am using is a custom button so it populates some fields automatically.
Best Answer chosen by Peter Cowen
sslodhi87sslodhi87
Hi Peter,
 I think once record saved successfully then it should return to the Case detail page. If this is the case the below mentioned the code
 
/a0x/e?CF00ND0000006QH7r={!Case.CaseNumber}
&CF00ND0000006QH7r_lkid={!Case.Id}
&retURL={!Case.Id}
&RecordType=012D0000000KKSb
&ent=01ID0000000OylN
&Name={!Case.CaseNumber}+Change+Log+Entry

Please let me know if this works for you..

Thanks

All Answers

sslodhi87sslodhi87
Hi Peter Cowen,

Can you please share the code?

Thanks
Peter CowenPeter Cowen
The code is:
/a0x/e?CF00ND0000006QH7r={!Case.CaseNumber}
&CF00ND0000006QH7r_lkid={!Case.Id}
&retURL=%2F500D0000019Jmd8
&RecordType=012D0000000KKSb
&ent=01ID0000000OylN
&Name={!Case.CaseNumber}+Change+Log+Entry

I think the RetURL is the problem but I have no clue what to enter so it refers back to the corresponding ticket.
sslodhi87sslodhi87
Hi Peter,
 I think once record saved successfully then it should return to the Case detail page. If this is the case the below mentioned the code
 
/a0x/e?CF00ND0000006QH7r={!Case.CaseNumber}
&CF00ND0000006QH7r_lkid={!Case.Id}
&retURL={!Case.Id}
&RecordType=012D0000000KKSb
&ent=01ID0000000OylN
&Name={!Case.CaseNumber}+Change+Log+Entry

Please let me know if this works for you..

Thanks
This was selected as the best answer
Peter CowenPeter Cowen
Thats sorted it thanks.