+ Start a Discussion
PetyaPetya 

Master-Detail Relationship

Hello
I made a custom object with a Master-Detail Relationship to its Parent Object Opportunity.
I want to see automatically the Opportunity-Name by this Custom Object, but I can’t see it.
Any Ideas?

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
jd123jd123

HI Petya

 

  May I know why you created custom button,you can override Standard button??

 

Just Override the New button with your  visualforce page. 

 

 

if my solution worked for you mark it as resolved.

 

 

Cheers

 



All Answers

MikeGillMikeGill

The master-detail field will be automatically populated with the Opportunity name when you create new records for your custom object - but I think this is not what you mean.

 

Please decribe your issue in more detail.

PetyaPetya

that was exactly what I meant.

But I found the Problem.

By my Child Object (custom Object) I created Custom Buttons with URLs. The URLs were not correct and that was the reason, that I couldn’t see the Master-Name on my new Child Record….

thank you very much :)

jd123jd123

HI Petya

 

  May I know why you created custom button,you can override Standard button??

 

Just Override the New button with your  visualforce page. 

 

 

if my solution worked for you mark it as resolved.

 

 

Cheers

 



This was selected as the best answer
PetyaPetya

thank you for your answer.

Yes but I canot rename the Standard Field, and I need this.

MikeGillMikeGill

You can rename standard fields BTW

 

Go to Setup > Tabs & Labels

PetyaPetya

ok thank you.

I needed 3 new button for 3 record types and that`s way I couldn`t override the standard button.

Thanks

 

jd123jd123

Custom button

URL

/apex/sobilling?id={!FConnect__Service_Order__c.Id}

 

 

you can get in the controller (class)

 

 

public with sharing class sobillingclass

  {
    public String  serviceOrderid{get;set;}

   

public sobillingclass(ApexPages.StandardController controller)

  {
   serviceOrderId=apexpages.currentpage().getparameters().get('id');

 

}

 

 

}

 

 

if this answer please mark it as resolve 

PetyaPetya

thank you very much!