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
Michelle Arndt 18Michelle Arndt 18 

Custom button not working

I have created a custom create button since we cannot define a lookup value with an action.  I have created the button, but when I go to test it states that the URL no longer exists.
I copied the url from the standard create button:
https://cs54.salesforce.com/setup/ui/recordtypeselect.jsp?ent=01I150000017oVu&retURL=%2F0060S000002E9GH&save_new_url=%2Fa03%2Fe%3FCF00N1500000CxfPc%3DAgent%2BTest%2B-%2B2017-03-21%26CF00N1500000CxfPc_lkid%3D0060S000002E9GH%26retURL%3D%252F0060S000002E9G

My custom button:
/setup/ui/recordtypeselect.jsp?ent=01I150000017oVu
&save_new_url==%2F{Quotes_RFR.Id}
&retURL=%2F{!Opportunity.Id}
&00N1500000HvjMd={!Opportunity.OwnerFullName}
&00N1500000Cxfq6={!Opportunity.Sales_Support_Contact__c}
&00N1500000Cxfsc={!Opportunity.Date_Received__c}
&00N1500000Cxfrg={!Opportunity.Date_Due__c}
&00N1500000CxftK="Being Worked"

After I select the record type I get the error;
Invalid Page Redirection
The page you attempted to access has been blocked due to a redirection to an outside website or an improperly coded link or button. Please contact your salesforce.com Administrator for assistance. For more information, see Insufficient Privileges Errors.
Best Answer chosen by Michelle Arndt 18
Michelle Arndt 18Michelle Arndt 18
/setup/ui/recordtypeselect.jsp?ent=01I150000017oVu 
&save_new_url=a03/e 
&retURL={!Opportunity.Id} 
&CF00N1500000HvjMd={!Opportunity.OwnerFullName} 
&CF00N1500000HvjMd_lkid={!User.Full_Name__c} 
&CF00N1500000CxfPc={!Opportunity.Name} 
&CF00N1500000Cxfq6={!Opportunity.Sales_Support_Contact__c} 
&00N1500000Cxfsc={!Opportunity.Date_Received__c} 
&00N1500000Cxfrg={!Opportunity.Date_Due__c}

All Answers

Tarun J.Tarun J.
Try removing extra characters (%2F) from your URL. 
Michelle Arndt 18Michelle Arndt 18
I did and the extra =   Same error
Tarun J.Tarun J.
Cam you share screen shot of you button code?
Michelle Arndt 18Michelle Arndt 18
User-added image
Tarun J.Tarun J.
Update save_new_url to below:

save_new_url={!Quotes_RFR.Id}

-Thanks,
TK

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Michelle Arndt 18Michelle Arndt 18
It did not work.  Error: Field Quotes_RFR.Id does not exist. Check spelling.
Tarun J.Tarun J.
From where you are getting Quotes_RFR.Id field. Is it showing under 'Select Field Type' drop down?

Is it containing the 3 characters of the object which you are trying to insert?

For e.g.: when you click on tab of your object, the URL will be something like: "https://ap1.salesforce.com/a08/o": So, your 'save_new_url' should be a08.
save_new_url=a08

check at your object level.

-Thanks,
TK
Michelle Arndt 18Michelle Arndt 18
When I opened the object tab the url is https://cs54.salesforce.com/a03/o.  I updated the button to:
/setup/ui/recordtypeselect.jsp?ent=01I150000017oVu
&save_new_url=a03o
&retURL={!Opportunity.Id}
&00N1500000HvjMd={!Opportunity.OwnerFullName}
&00N1500000Cxfq6={!Opportunity.Sales_Support_Contact__c}
&00N1500000Cxfsc={!Opportunity.Date_Received__c}
&00N1500000Cxfrg={!Opportunity.Date_Due__c}
&00N1500000CxftK="Being Worked"

After I select the record type I want it directs me to the page that indicates that the URL No Longer Exists
Michelle Arndt 18Michelle Arndt 18
/setup/ui/recordtypeselect.jsp?ent=01I150000017oVu 
&save_new_url=a03/e 
&retURL={!Opportunity.Id} 
&CF00N1500000HvjMd={!Opportunity.OwnerFullName} 
&CF00N1500000HvjMd_lkid={!User.Full_Name__c} 
&CF00N1500000CxfPc={!Opportunity.Name} 
&CF00N1500000Cxfq6={!Opportunity.Sales_Support_Contact__c} 
&00N1500000Cxfsc={!Opportunity.Date_Received__c} 
&00N1500000Cxfrg={!Opportunity.Date_Due__c}
This was selected as the best answer
Tarun J.Tarun J.
try using:
&save_new_url=/a03o/e

-Thanks,
TK
Tarun J.Tarun J.
Update:
&save_new_url=/a03/e