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
DRobi83DRobi83 

saveURL does not work on custom button, no matter what i try

Hello

 

Can someone please tell me where i am going wrong with this code? The saveURL is simly not being executed, and the record stays on the newly created record after save. If you cancel, yes, it does revert back to the parent, but the save ALWAYS stays on the child, where i would like it to go back to the parent (ticket is the parent, ticket comment is the child)

 

/apex/AddComment?CF00N90000002Fdf1={!miiHelpDeskT2__Ticket__c.Name}&CF00N90000002Fdf1_lkid={!miiHelpDeskT2__Ticket__c.Id}&CF00N90000002Fdf8{!miiHelpDeskT2__Ticket__c.miiHelpDeskT2__Ticket_Manager_Name__c}&CF00N90000002Fdf8_lkid={!miiHelpDeskT2__Ticket__c.miiHelpDeskT2__Ticket_Manager_NameId__c}&CF00N90000002zw4A_lkid={!miiHelpDeskT2__Ticket__c.miiHelpDeskT2__Subject__c}&CF00N90000002zw4F_lkid={!miiHelpDeskT2__Ticket__c.miiHelpDeskT2__Description__c}&sfdc.override=1&retURL=%2F{!miiHelpDeskT2__Ticket__c.Id}&saveURL=%2F{!miiHelpDeskT2__Ticket__c.Id}

 

Its worth mentioning that without the below part, the whole custom button does not work

 

&sfdc.override=1

V1nitV1nit

use the parameter retURL instead of SaveURL.

 

for example retURL={!Ticket__c.Id}

DRobi83DRobi83

Hello


Thanks for your reply.

 

 

You can see in the code i am also using the retURL prior to the saveURL.

 

I tried taking it out (the saveURL) and leaving the retURL but this also did not work

V1nitV1nit

I have something similar in my salesforce instance which I have implemented an year ago and it works perfectly for me.

The code below is used in a custom button that copies across the values from an OPPORTUNITY record to a PROJECT record and upon saving the PROJECT record the url is redirected to the OPPORTUNITY record screen.

Go through the below code and see if it gives you any idea on getting your stuff working.

 

 

https://ap1.salesforce.com/a0E/e?retURL={!Opportunity__c.Id}&Name={!Opportunity__c.Name}&

00N90000001km0G={!Opportunity__c.Details__c}&00N90000002QZrG={!Opportunity__c.Role_1__c}&

00N90000002QZrH={!Opportunity__c.Role_2__c}&00N90000002QZrI={!Opportunity__c.Role_3__c}&

CF00N90000001knaW={!Opportunity__c.Account__c}&

CF00N90000001knaX={!Opportunity__c.Client_Contact_1__c}&

CF00N90000002QZrE={!Opportunity__c.Client_Contact_2__c}&

CF00N90000002QZrF={!Opportunity__c.Client_Contact_3__c}

DRobi83DRobi83

Hello

 

I tried your code and it does not work. I believe because i do not use the /e? because i am referring to a visualforce page directly, which goes to edit/input fields

 

I tried putting my retURL first up in the formula and it did not work.

 

Hmmm

Mark J. RoceeMark J. Rocee

you are right, I am facing the same problem. No matter what you do it does not work. However you can use the /e parameter also on visualforce sites like

 

insatance.salesforce.com/apex/somesite?e

 

Of course you can write an apex code, but that is not the solution we are looking for.

Have you found any solution yet?