+ Start a Discussion
Ross.ax1563Ross.ax1563 

Quote.Contact

Hi

 

I am trying to pass the Contact (Prepared For) ID in a detail page button on the Quote Object to a VF page.  Every time I use Quote.Contact or Quote.ContactID I get an error indicating the field does not exist. What should I use?

 

Many thanks in advance

Ross

Best Answer chosen by Ross.ax1563
goabhigogoabhigo

You are almost there. If you want just name (plain text) then you can use Quote.Contact.Name, if you want name as link then use Quote.ContactId

 

<apex:outputField value="{!Quote.ContactId}"/>
<apex:outputField value="{!Quote.Contact.Name}"/>

 

Let me know if this helps.

All Answers

goabhigogoabhigo

You are almost there. If you want just name (plain text) then you can use Quote.Contact.Name, if you want name as link then use Quote.ContactId

 

<apex:outputField value="{!Quote.ContactId}"/>
<apex:outputField value="{!Quote.Contact.Name}"/>

 

Let me know if this helps.

This was selected as the best answer
Ross.ax1563Ross.ax1563

Many thanks for the reply.

 

I am not trying to output it in a VF page - I am trying to pass it in the URL when a Custom Button is clicked:-

 

/apex/emailpdf?title=eMail Quotation&toid={!Opportunity.CQS_Quote_ContactId__c}&whatid={!Opportunity.Id}&returl={!Opportunity.Id}&&page1=opp_quote&filename1={!Opportunity.CQS_Product_Category__c} Quotation - {!Opportunity.Account} - {!NOW()}&id={!Opportunity.Id}

Rahul SharmaRahul Sharma

RossSeems some bug while accessing Quote.ContactId.

An option you could do is to use a formula field which would copy ContactId, Then use that formula field for passing ContactId in url.

Mirko ColalucaMirko Colaluca

I have the same issue, but I don't know how to write such a formula.
Can you help me?

Priya Aakanksha 3Priya Aakanksha 3
Mirko, You can create one formula field return type as text in Quote object-->  
Contact.FirstName +' '+ Contact.LastName
Let me know if this helps.