0

I have a related list A on B. I need to create a button on A. IF the user clicks this button, it should behave just like the "NEW" button, but the record type should be same as the parent, i.e B.

Example-- I have a record--- That is B--- Record type is "New User" On the related list of this record, That is A, I need to create a button, which should behave as " create a new record of A". But the record type here should be "New User". So the record type should be same as B.

Please help me. They do not want a VF page here on the related list.

2 Answers 2

0

Go to Setup > Create > Object > ObjectA > Buttons Links and Actions > New Button Or Link

Choose a list type button that will display in the existing page with no header or sidebar that will redirect to a url, and give it the value:

https://ap1.salesforce.com/ObjectAPrefix/e?retURL=%2F{!ObjectB.Id}%2F&RecordType={!ObjectB.RecordTypeId}

ObjectAPrefix is the first three letters/numbers in ObjectA ids. For the account object it is "001".

Then you can go into the ObjectB page layout and on the ObjectA related list, you will find a wrench. Click on it and scroll to the bottom of the pop-up where you will find a header with a "+" sign. Click on that and you will see the section where you can add your button to the related list and remove the old button.

2
  • Insufficient Privileges You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. For more information, see Insufficient Privileges Errors. I am facing this error
    – PSH
    Commented Sep 17, 2015 at 16:51
  • @user3303348 When did you see this error message, and do you have the customize application permission?
    – martin
    Commented Sep 18, 2015 at 1:28
0

Thanks everyone. I used the java script button which solved the problem. The on click java script button.

You must log in to answer this question.

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