+ Start a Discussion
cvm_asishcvm_asish 

How to differentiate relatedlist in two different object

hello friends,

 

I have created two objects. One for "Supplier" and another for "Customer". Both object have a lookup relation with native "Contact" object. I have overridden the "New" button in Contact object with a visualforce Page. Now the issue is:-

 

How do I know that from which Object's related list(Contact) I have clicked to create a new Contact? Is it coming from "Supplier" or from "Customer".

 

It will be greatful if you can give some quick response.

 

Thanks in advance.

 

Thanks

Asish  

 

bob_buzzardbob_buzzard

When I've needed this in the past, I've created a page for each related list and moved all the page body into a component.  That way the page simply contains the component markup, including an attribute passed to the component indicating which related list it came from.

 

You may be able to change your button to open a URL, which would be the VF page plus a parameter indicating the related list type, but I've not done this myself.

cvm_asishcvm_asish

hey Bob,

 

thanks for ur suggestions, lemme try my luck with this solution :)

 

thanks

Asish