+ Start a Discussion
SandrineSandrine 

List button on the Account examples

Hello,


User-added image

I am creating a list button like above, 

Below is the thing i put in button
/001/e
&retURL=%2F001%2Fo
&cancelURL={!Opportunity.Id}
&ent=Account
In standard creation wizard for creation of Account:
​
The user has many record types to choose:

so the first URL appearing for record selection is like below:

https://axyz.cs82.my.salesforce.com/setup/ui/recordtypeselect.jsp
?ent=Account
&retURL=%2F001%2Fo
&save_new_url=%2F001%2Fe%3FretURL%3D%252F001%252Fo

Once the first record is selected, the URL is like below:

https://xyz.cs82.my.salesforce.com/
001/e
?retURL=%2F001%2Fo
&RecordType=012D0000000kZUw
&ent=Account

I want to have the same behavior for record selection:

Am i missing something in my button ?
Best Answer chosen by Sandrine
LBKLBK
If you want to add "New Account" button in Opportunity Page Layout(with a Cancel button that will take you back to the same Opportunity), here is the URL.
 
/001/e?retURL=%2F001%2Fo&RecordType=012410000012Z99&ent=Account&cancelURL={!Opportunity.Id}
Remember to change the RecordType value in the URL above.

If you don't pass the recordtype in the URL, you will not land in the New Account Page Layout (if you have more than one recordtype of course).

Hope this helps.
 

All Answers

LBKLBK
Why have you encoded the value in retURL?

Also, {!Opportunity.Id} is not a valid value in an Account button.
SandrineSandrine
Is there something else i can add as paramenter
LBKLBK
If you want to add "New Account" button in Opportunity Page Layout(with a Cancel button that will take you back to the same Opportunity), here is the URL.
 
/001/e?retURL=%2F001%2Fo&RecordType=012410000012Z99&ent=Account&cancelURL={!Opportunity.Id}
Remember to change the RecordType value in the URL above.

If you don't pass the recordtype in the URL, you will not land in the New Account Page Layout (if you have more than one recordtype of course).

Hope this helps.
 
This was selected as the best answer