+ Start a Discussion

Find Return url

   I have an issue like find out the parent name from the child object.
For instance, I have two parent object name called account and contact. and i have one related list object which is a child to both parent object. Now i wanted to edit the page of child and return to the appropriate object detail page. The issue here is how to find out which object i came from.
In my case all the pages(save and savenew i can able to give return url. Because i used to check null value of the contact or account But in edit page i will not be able to. ) are overridden page.
Child object details:
Account--- Master lookup field
Contact---lookup field
Dont fully understand what you're after, as I dont understand how you have two parents to the one child object. Per your description Account is the true master object, so I dont see how that field could be null? Maybe you need to consider using Apex triggers...


Thanks for replying.  But we have an option like two super class with one sub class i n java. Right...? Since we new to this salesforce we have no idea about this. In my project i need one related list object for both the object like (Contact and Account). What is your opinion about this...  My related list object page is overridden page with two look up called account and contact. Save,save new and save clone everything is done with the help of contact not eqal to null option. But for edit we have two values(account and contact). I don know how to implement this logic.