0

I want a custom button on a related list called 'Associated Facility' of Account to create Opportunity and this button should behave exactly like a standard 'New Opportunity' button.

I have created a Custom button as List button and used the below formula in the formula editor, but here the problem is the value in the Account lookup field for new Opportunity which is getting populated as constant value for every new opportunity:

{!URLFOR("https://cs45.salesforce.com/setup/ui/recordtypeselect.jsp?ent=Opportunity&retURL=%2F0018A000008TiIA&save_new_url=%2F006%2Fe%3FretURL%3D%252F0018A000008TiIA%26accid%3D0018A000008TiIA")}

Anyone please suggest a solution for this problem.

1 Answer 1

0

You can make URL dynamic for Account by a syntax similar to below:

URLFOR("https://cs45.salesforce.com/setup/ui/recordtypeselect.jsp?ent=Opportunity&retURL=/{!Account.id}&save_new_url=/006/e?retURL=/{!Account.id}&accid={!Account.id}")

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .