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
BerginBergin 

How to invoke custom page for new relatedlist

I have custom objects A and B. The relationship between A & B is set using a custom object C, with object A & B (master detail) as fields of C.

 

I have created a custom lookup page to bind object B (to A) which is set as related list to Object A.

I want to invoke the custom page when  I click on New button in the related list. How can I achieve this?

 

Thanks,

Best Answer chosen by Admin (Salesforce Developers) 
BerginBergin

Here's what i did.

 

1. Create a button in object C to go to my new custom lookup page url

2. In Object A, I added the button in the related lists section.

 

So, when I load object A's data, the new button showed in the related list.

 

Hope this helps others looking for similar solutions.

All Answers

wt35wt35

When you say "Custom lookup page" , do you mean it is a Visaulforce page?

If so, can you paste the page code and the controller?

BerginBergin

@wt35 - I solved the issue myself. I followed this blog for custom lookup. http://blog.jeffdouglas.com/2011/08/12/roll-your-own-salesforce-lookup-popup-window/

 

thanks for your response.

BerginBergin

Here's what i did.

 

1. Create a button in object C to go to my new custom lookup page url

2. In Object A, I added the button in the related lists section.

 

So, when I load object A's data, the new button showed in the related list.

 

Hope this helps others looking for similar solutions.

This was selected as the best answer