• Janis Davis 22
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 11
    Replies
We currently have 44 Price Books for each Branch. Many of our Products are included in multiple Price Books, however, they have different pricing, Units of Measure, etc. Sales management wants some custom fields visible (read-only, not calculable) to be visible on the user product entry screen as guides. I created 3 picklist fields (different values depending on the Price Book) on the Price Book Entry screen and set the values for a specific Price Book. Next, I created the same custom field names in the Opportunity Product record as formula fields to pull the value I set through. Although the custom fields show up on the Opportunity Product page layout, they do not show up on the user Product Entry screen - probably because they are formula fields? Is there a way to make these custom formula fields show up with the individual Price Book value I set in the user Product Entry screen (see screenshots below)? 

User-added image

User-added image

When I added a Product to an Opportunity from the Price Book I tested and clicked view on the Product on the Opportunity record, the custom formula fields I set for the Price Book entry showed up just fine (screenshot below).

User-added image
Hello! 

I was very excited about what I read about Process Builder capabilities being better than WFRs, but I don't seem to be able to get it to work any better on scheduled actions and SF support is telling me what seems like a fairly simple Process can't be done without a development trigger. Well, I have to say that my experience with the Answers and Development Communities has always been much better than going through SF support. You people are smarter since you face the same types of business requirements the rest of SF customers and always come up with totally innovative solutions and workarounds That said, here is the issue I need help with:

USE CASE: Our sales management team wants a process put in place to ensure that our sales reps follow-up on Opportunities that are assigned to them by Inside Sales, Managers, etc.
  • Immediate action - when an Opportunity is assigned to a sales rep, they receive an HTML email alert with all the details of the Opportunity pulled in with merge fields and links they can access on their mobile devices. The action we want the sales reps to take is to go to the Opportunity and update the custom Assigned Opportunity Contact Status field value from the No Contact default value to another contact action value (i.e. Left VM, Contacted, Sent Quote, etc.) to show that they have taken an action on the assigned Opportunity. If that happens, the scheduled actions should not fire (see criteria screenshot below). I’m not sure I have the right formula for criteria #1 to trigger the scheduled actions – so any help on that will be much appreciated.
User-added image
 
  • Scheduled Action 1 - If there has not been some customer/prospect contact when an Opportunity has been assigned to them, after 8 hours, they want the sales rep and their branch manager to receive an email alert that no Contact action has been taken on the assigned Opportunity (see screenshot below)
User-added image
 
  • Scheduled Action 2 - If there has not been some customer/prospect contact when an Opportunity has been assigned to them, after 24 hours, they want the sales rep and their area manager and RVP to receive an email alert (see screenshot below).
User-added image

So basically I have one immediate email alert action, and two scheduled email alert actions. I have a WFR in place that sets the Date/Time when an Opportunity Ownership has been changed and assigned to a new owner in a custom field Ownership Date Change in the Opportunity record. This WFR also populates another custom field in the Opportunity for Assigned Opportunity Contact Status that defaults to the picklist value No Contact (screenshot below).
 
Since changing the Opportunity Owner is not considered an actually edit to the Opportunity record to drive the process forward, I’m using the custom Ownership Change Date (Date/Time) field in the Opportunity record that populates via my WFR when an Opportunity Owner has been changed.
 
I problem I’m having is that although the immediate action and the first scheduled action fire correctly, the second scheduled action does not fire – particularly if there have been any kind of field edit to the Opportunity record once the process starts. It could be any random field edit not the ones included in the Process criteria. SF Support is telling me that what seems like a pretty simple process won’t work in Process Builder due to product limitations and would require a development Trigger and I’m not a developer. There has got to be a way or some workaround to make this process work. I’m hoping some of you very smart gurus out there have some ideas/suggestions and/or workaround that can make this process work.
 
Any help and/or advice will be very much appreciated!!!
 
Thanks!



 
Hi All,

VF novice here again hoping to get some expert help from this Community VF gurus. Our Quotes were created  in VF - primarily to enable spell check in the rich text Scope of Work field using CKEditor. I've been trying to make some updates to the existing VF Quote records and templates to add new fields. I was able to add the 4 new fields I needed to the Quote record the VF page code and the Quote template. The problem I'm having is that although the field name and any applicable entries show up fine when a Quote is created/saved and in the Quote template, only the field entries are showing up in the Quote PDF. The field names before the entries do not show up in the Quote PDF and I can't figure out how to fix it. Pasted below are screenshots of the record views I referenced as well as the VF page code I modified highlighted in yellow. 

Any help or advice on this will be very much appreciated!!!!

Four New Quote Fields in Additional Fees & Charges Section of Quote
User-added image

Quote Template with the Four New Fields Added
User-added image
Quote PDF with an Entry in the Standby Charges field - but NO Field Names from Those Fields
User-added image
Quote VF Page Code Updated with Four New Fields (Highlighted in Yellow)

<apex:page standardController="Quote" extensions="Quote_extension">
 
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"/>
<apex:includescript value="{!URLFOR($Resource.ckeditorcustom2, 'ckeditor.js')}" />
  
<apex:form >
<apex:pageMessages id="msgs"/>
<apex:sectionheader title="Quote Edit" subtitle="{!if(Quote.Id==null,'New Quote',Quote.Name)}"></apex:sectionheader>
<apex:pageBlock mode="edit" id="QuotePB" title="Quote Edit">
 
<apex:pageblockbuttons >
    <apex:commandbutton action="{!save}" value="Save"></apex:commandbutton>
    <apex:commandbutton action="{!cancel}" value="Cancel"></apex:commandbutton>
</apex:pageblockbuttons>
 
<apex:pageblocksection id="QuoteInformationPBS" title="Quote Information">
    <apex:outputtext value=""></apex:outputtext>
    <apex:outputtext value=""></apex:outputtext> 
    <apex:inputfield value="{!Quote.Name}"></apex:inputfield>  
    <apex:outputField value="{!opp1.AccountId}" > </apex:outputField>
    <apex:inputField value="{!Quote.Proposal_Price__c}"  rendered="{!Quote.RecordType.Name='Lump Sum Proposal'}" required="true"/>  
    <apex:inputField value="{!Quote.Proposal_Price__c}"  rendered="{!Quote.RecordTypeID='012i0000001AXkl'}" required="true"/>
    <apex:inputField value="{!Quote.Proposal_Price__c}"  rendered="{!Quote.RecordType.Name='Lump Sum Proposal TEST VF'}" required="true"/>  
    <apex:inputField value="{!Quote.Proposal_Price__c}"  rendered="{!Quote.RecordTypeID='0123B0000008aYW'}" required="true"/>          
    <apex:inputField value="{!Quote.Unit_Price__c}"  rendered="{!Quote.RecordType.Name='Unit Price Proposal'}" required="true"/>
    <apex:inputField value="{!Quote.Unit_Price__c}"  rendered="{!Quote.RecordTypeID='012i0000001AXkn'}" required="true"/>
    <apex:outputField value="{!Quote.OpportunityID}"> </apex:outputField>            
    <apex:inputField value="{!Quote.Unit_of_Measure__c}" rendered="{!Quote.RecordType.Name='Unit Price Proposal'}" required="true"/>
    <apex:inputField value="{!Quote.Unit_of_Measure__c}"  rendered="{!Quote.RecordTypeID='012i0000001AXkn'}" required="true"/>
    <apex:inputfield value="{!Quote.Expiration_Interval__c}"  required="true"></apex:inputfield>
    <apex:inputfield value="{!Quote.Expiration_Date__c}" ></apex:inputfield>   
    <apex:outputtext value=""></apex:outputtext>     
</apex:pageblocksection>
 
<apex:pageblocksection id="ContactInformationPBS" title="Contact Information">
     <apex:inputField value="{!Quote.ContactId}" ></apex:inputField>
      <apex:outputfield value="{!Quote.Contact.Phone}" ></apex:outputfield>
   <apex:outputfield value="{!Quote.Contact.Email}"></apex:outputfield> 
   <apex:outputfield value="{!Quote.Contact.Fax}" ></apex:outputfield> 
</apex:pageblocksection>
 
<apex:pageblocksection id="ScopeofWorkPBS" columns="1" title="Scope of Work">
<apex:inputTextArea value="{!Quote.Scope_of_Work__c}" label="" styleclass="ckeditor" richtext="false" required="true"/>
</apex:pageblocksection>
 
<apex:pageblocksection id="QuoteAdditionalFeesorCharges" title="Additional Fees or Charges">
        <apex:inputfield value="{!Quote.Additional_Charges_to_be_Included_in_SOW__c}"></apex:inputfield>
        <apex:inputfield value="{!Quote.Minimum_Charge__c}" label="Minimum Charge"></apex:inputfield>
        <apex:inputfield value="{!Quote.Standby_Charges__c}"></apex:inputfield>
        <apex:inputfield value="{!Quote.Not_to_Exceed_Amount__c}"></apex:inputfield>
  </apex:pageblocksection>
 
<apex:pageblocksection id="ConditionsExclusionsPBS"  title="Exclusions and Conditions" columns="2">
<apex:pageblockSectionItem >
<apex:inputTextarea value="{!Quote.Conditions_Exclusions__c}"  cols="150" rows="25" required="true" label="Exclusions and Conditions"/>
</apex:pageblockSectionItem>
</apex:pageblocksection>
 
</apex:pageBlock>
</apex:form>
</apex:page>


 
Hi! I'm a VF novice and I'm trying to add a new Section header and field to an existing VF Quote page, however neither are showing up on the Quote page. The existing code is pasted below with the section/field  I'm trying to add that is not showing up highlighted in yellow. Not sure what I'm doing wrong.

Any help or advise on this will be very much appreciated!

Thanks!

<apex:page standardController="Quote" extensions="Quote_extension">
 
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"/>
<apex:includescript value="{!URLFOR($Resource.ckeditorcustom2, 'ckeditor.js')}" />
  
<apex:form >
<apex:pageMessages id="msgs"/>
<apex:sectionheader title="Quote Edit" subtitle="{!if(Quote.Id==null,'New Quote',Quote.Name)}"></apex:sectionheader>
<apex:pageBlock mode="edit" id="QuotePB" title="Quote Edit">
 
<apex:pageblockbuttons >
    <apex:commandbutton action="{!save}" value="Save"></apex:commandbutton>
    <apex:commandbutton action="{!cancel}" value="Cancel"></apex:commandbutton>
</apex:pageblockbuttons>
 
<apex:pageblocksection id="QuoteInformationPBS" title="Quote Information">
    <apex:outputtext value=""></apex:outputtext>
    <apex:outputtext value=""></apex:outputtext> 
    <apex:inputfield value="{!Quote.Name}"></apex:inputfield>  
    <apex:outputField value="{!opp1.AccountId}" > </apex:outputField>
    <apex:inputField value="{!Quote.Proposal_Price__c}"  rendered="{!Quote.RecordType.Name='Lump Sum Proposal'}" required="true"/>  
    <apex:inputField value="{!Quote.Proposal_Price__c}"  rendered="{!Quote.RecordTypeID='012i0000001AXkl'}" required="true"/>
    <apex:inputField value="{!Quote.Proposal_Price__c}"  rendered="{!Quote.RecordType.Name='Lump Sum Proposal TEST VF'}" required="true"/>  
    <apex:inputField value="{!Quote.Proposal_Price__c}"  rendered="{!Quote.RecordTypeID='0123B0000008aYW'}" required="true"/>          
    <apex:inputField value="{!Quote.Unit_Price__c}"  rendered="{!Quote.RecordType.Name='Unit Price Proposal'}" required="true"/>
    <apex:inputField value="{!Quote.Unit_Price__c}"  rendered="{!Quote.RecordTypeID='012i0000001AXkn'}" required="true"/>
    <apex:outputField value="{!Quote.OpportunityID}"> </apex:outputField>            
    <apex:inputField value="{!Quote.Unit_of_Measure__c}" rendered="{!Quote.RecordType.Name='Unit Price Proposal'}" required="true"/>
    <apex:inputField value="{!Quote.Unit_of_Measure__c}"  rendered="{!Quote.RecordTypeID='012i0000001AXkn'}" required="true"/>
    <apex:inputfield value="{!Quote.Expiration_Interval__c}"  required="true"></apex:inputfield>
    <apex:inputfield value="{!Quote.Expiration_Date__c}" ></apex:inputfield>
    <apex:inputfield value="{!Quote.Additional_Charges_to_be_Included_in_SOW__c}"></apex:inputfield>  
    <apex:outputtext value=""></apex:outputtext>     
</apex:pageblocksection>
 
<apex:pageblocksection id="ContactInformationPBS" title="Contact Information">
     <apex:inputField value="{!Quote.ContactId}" ></apex:inputField>
      <apex:outputfield value="{!Quote.Contact.Phone}" ></apex:outputfield>
   <apex:outputfield value="{!Quote.Contact.Email}"></apex:outputfield> 
   <apex:outputfield value="{!Quote.Contact.Fax}" ></apex:outputfield> 
</apex:pageblocksection>
 
<apex:pageblocksection id="ScopeofWorkPBS" columns="1" title="Scope of Work">
<apex:inputTextArea value="{!Quote.Scope_of_Work__c}" label="" styleclass="ckeditor" richtext="false" required="true"/>
</apex:pageblocksection>
 
<apex:pageblocksection id="QuoteAdditionalFeesorChargesPBS" title="Additional Fees or Charges">
        <apex:inputfield value="{!Quote.Minimum_Charge__c}"></apex:inputfield>  
  </apex:pageblocksection>
 
<apex:pageblocksection id="ConditionsExclusionsPBS"  title="Exclusions and Conditions" columns="2">
<apex:pageblockSectionItem >
<apex:inputTextarea value="{!Quote.Conditions_Exclusions__c}"  cols="150" rows="25" required="true" label="Exclusions and Conditions"/>
</apex:pageblockSectionItem>
</apex:pageblocksection>
 
</apex:pageBlock>
</apex:form>
</apex:page>
 
Since the Opportunity Contact Roles related list is not natively customizable, I took the advice of someone on the Communities and created a VisualForce page for the Opportunity Contact Roles to be able to pull the Mobile phone number field into the related list. That worked fine, except when I needed to add the Del link next to the Edit link so we can remove Contact from Opportunity Role that are no longer with the company and/or are no longer a Role in an Opportunity (screenshot below).

User-added image
Someone on the Community helped me with the VF code and also gave me some code to create a Controller. I followed the instructions, however I'm still getting the SObject row was retrieved via SOQL without querying the requested field: Contact.Account error. Pasted below is the code for both the VF page and the Controller. Can someone please tell me what I'm missing or doing wrong? Any help and/or advice on this will be most appreciated!

VF Page Code
<apex:page standardController="Opportunity" extensions="DeletePage" id="opfrm" >
    <apex:form id="form">  
        <apex:pageBlock title="Contact Roles">
            <apex:pageBlockTable value="{!opt}" var="ContactRole" id="pgblktab">
                <apex:column >
                    <apex:facet name="header">
                        Action
                    </apex:facet>
                    <a href="/p/opp/ContactRoleEditUi/e?oppid={!Opportunity.Id}&retURL=%2F{!Opportunity.Id}" target="_top">Edit</a>  |
                 <a href="javascript:if (window.confirm('Are you sure?')) Deleteopt('{!ContactRole.Id}');" style="font-weight:bold">Del</a>
                   </apex:column>
                <apex:column >
                    <apex:facet name="header"> Contact Name </apex:facet>
                    <a href="/{!ContactRole.Contact.Id}" target="_top">{!ContactRole.Contact.Name} </a>
                    </apex:column>
                <apex:column value="{!ContactRole.Contact.Account.Name}" headerValue="Account Name"/>
                <apex:column value="{!ContactRole.Contact.Email}" headerValue="Email"/>
                <apex:column value="{!ContactRole.Contact.Phone}" headerValue="Phone"/>
               <!-- <apex:column value="{!ContactRole.Role}" headerValue="Role"/>
<apex:column value="{!ContactRole.Contact.MobilePhone}" headerValue="Mobile"/>
            -->
<apex:column value="{!ContactRole.IsPrimary}" headerValue="Is Primary"/>
            </apex:pageBlockTable>  
            <apex:pageBlockButtons location="top">
                <input type="button" class="btn" value="New" onclick="javascript:window.open('/p/opp/ContactRoleEditUi/e?oppid={!Opportunity.Id}&retURL=%2F{!Opportunity.Id}');"/>
            </apex:pageBlockButtons>     
        </apex:pageBlock>  
          <apex:actionFunction action="{!Deleteopt}" name="Deleteopt" reRender="form">
         <apex:param name="OpportunityContactRoles" value="" assignTo="{!SelectedoptId}"/>
        </apex:actionFunction>       
    </apex:form>
</apex:page>

Controller Code
public with sharing class DeletePage {

   public List<OpportunityContactRole> opt{ get; set; }
  
 
   public string SelectedoptId { get; set; }
   public DeletePage(ApexPages.StandardController controller) {
    LoadData();
    }

   private void LoadData() {
       opt= [Select id,ContactId,IsPrimary,Contact.Name from OpportunityContactRole limit 20];
          }
  
   public pagereference Deleteopt()
   {
      // if for any reason we are missing the reference 
      if (SelectedoptId == null) {
      
         return null;
      }
     
      OpportunityContactRole  tobeDeleted = null;
      for(OpportunityContactRole a : opt)
       if (a.Id == SelectedoptId ) {
          tobeDeleted = a;
          System.debug('#############'+ a);
          break;
       }
      
      if (tobeDeleted != null) {
      Delete tobeDeleted;
      

      }
      LoadData();
      return null;
   } 
 
}

 

                    
 

 
I recently posted a question about the VF code for customizing the Opportunity Contact Roles to show additional Contact fields. Karanrajs very graciously fixed my code to show what I needed (thread like below)

https://developer.salesforce.com/forums/?id=906F0000000kB3NIAU

I now need to add the Del function to my VF Contact Roles page. I tried playing around with code a bit and I got the Del link to show up, however it gives the URL not found error. 

User-added image

Any help or advice will be most appreciated!

Thanks!
I needed to be able to customize the fields visible on the Contact Role Opportunity related list to add the Contact Mobile Phone. I searched Answers and the famous Deepak came up with a brillant work-around solution using VisualForce (see link to the original thread below).

https://success.salesforce.com/answers?id=90630000000hp0AAAQ

I used the VF code he provided and modified it to pull in the Contact Mobile Phone into the Contact Roles related list on the Opportunity. It works perfectly except for a couple of things:
  • When I click to add a New Contact Role in the new VF page on the Opportunity, it pulls it in within the full SF tab and sidebar window (see screen shot below).
  • There is no link to the Contact record in the VF Contact Role related list (see screen shot below).
Add New Contact Role Opens in the full SF tab and sidebar window Shot
User-added image

VF Contact Role has no link to the Contact record​
User-added image


Does anyone know if is there a way to modify the VF code Deepak provided to resolve these two issues? 

Any help or advice will be most appreciated!

Thanks!
 
I needed to be able to customize the fields visible on the Contact Role Opportunity related list to add the Contact Mobile Phone. I searched Answers and the famous Deepak came up with a brillant work-around solution using VisualForce (see link to the original thread below).

https://success.salesforce.com/answers?id=90630000000hp0AAAQ

I used the VF code he provided and modified it to pull in the Contact Mobile Phone into the Contact Roles related list on the Opportunity. It works perfectly except for a couple of things:
  • When I click to add a New Contact Role in the new VF page on the Opportunity, it pulls it in within the full SF tab and sidebar window (see screen shot below).
  • There is no link to the Contact record in the VF Contact Role related list (see screen shot below).
Add New Contact Role Opens in the full SF tab and sidebar window Shot
User-added image

VF Contact Role has no link to the Contact record​
User-added image


Does anyone know if is there a way to modify the VF code Deepak provided to resolve these two issues? 

Any help or advice will be most appreciated!

Thanks!
 
Hello! 

I was very excited about what I read about Process Builder capabilities being better than WFRs, but I don't seem to be able to get it to work any better on scheduled actions and SF support is telling me what seems like a fairly simple Process can't be done without a development trigger. Well, I have to say that my experience with the Answers and Development Communities has always been much better than going through SF support. You people are smarter since you face the same types of business requirements the rest of SF customers and always come up with totally innovative solutions and workarounds That said, here is the issue I need help with:

USE CASE: Our sales management team wants a process put in place to ensure that our sales reps follow-up on Opportunities that are assigned to them by Inside Sales, Managers, etc.
  • Immediate action - when an Opportunity is assigned to a sales rep, they receive an HTML email alert with all the details of the Opportunity pulled in with merge fields and links they can access on their mobile devices. The action we want the sales reps to take is to go to the Opportunity and update the custom Assigned Opportunity Contact Status field value from the No Contact default value to another contact action value (i.e. Left VM, Contacted, Sent Quote, etc.) to show that they have taken an action on the assigned Opportunity. If that happens, the scheduled actions should not fire (see criteria screenshot below). I’m not sure I have the right formula for criteria #1 to trigger the scheduled actions – so any help on that will be much appreciated.
User-added image
 
  • Scheduled Action 1 - If there has not been some customer/prospect contact when an Opportunity has been assigned to them, after 8 hours, they want the sales rep and their branch manager to receive an email alert that no Contact action has been taken on the assigned Opportunity (see screenshot below)
User-added image
 
  • Scheduled Action 2 - If there has not been some customer/prospect contact when an Opportunity has been assigned to them, after 24 hours, they want the sales rep and their area manager and RVP to receive an email alert (see screenshot below).
User-added image

So basically I have one immediate email alert action, and two scheduled email alert actions. I have a WFR in place that sets the Date/Time when an Opportunity Ownership has been changed and assigned to a new owner in a custom field Ownership Date Change in the Opportunity record. This WFR also populates another custom field in the Opportunity for Assigned Opportunity Contact Status that defaults to the picklist value No Contact (screenshot below).
 
Since changing the Opportunity Owner is not considered an actually edit to the Opportunity record to drive the process forward, I’m using the custom Ownership Change Date (Date/Time) field in the Opportunity record that populates via my WFR when an Opportunity Owner has been changed.
 
I problem I’m having is that although the immediate action and the first scheduled action fire correctly, the second scheduled action does not fire – particularly if there have been any kind of field edit to the Opportunity record once the process starts. It could be any random field edit not the ones included in the Process criteria. SF Support is telling me that what seems like a pretty simple process won’t work in Process Builder due to product limitations and would require a development Trigger and I’m not a developer. There has got to be a way or some workaround to make this process work. I’m hoping some of you very smart gurus out there have some ideas/suggestions and/or workaround that can make this process work.
 
Any help and/or advice will be very much appreciated!!!
 
Thanks!



 
Hi! I'm a VF novice and I'm trying to add a new Section header and field to an existing VF Quote page, however neither are showing up on the Quote page. The existing code is pasted below with the section/field  I'm trying to add that is not showing up highlighted in yellow. Not sure what I'm doing wrong.

Any help or advise on this will be very much appreciated!

Thanks!

<apex:page standardController="Quote" extensions="Quote_extension">
 
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"/>
<apex:includescript value="{!URLFOR($Resource.ckeditorcustom2, 'ckeditor.js')}" />
  
<apex:form >
<apex:pageMessages id="msgs"/>
<apex:sectionheader title="Quote Edit" subtitle="{!if(Quote.Id==null,'New Quote',Quote.Name)}"></apex:sectionheader>
<apex:pageBlock mode="edit" id="QuotePB" title="Quote Edit">
 
<apex:pageblockbuttons >
    <apex:commandbutton action="{!save}" value="Save"></apex:commandbutton>
    <apex:commandbutton action="{!cancel}" value="Cancel"></apex:commandbutton>
</apex:pageblockbuttons>
 
<apex:pageblocksection id="QuoteInformationPBS" title="Quote Information">
    <apex:outputtext value=""></apex:outputtext>
    <apex:outputtext value=""></apex:outputtext> 
    <apex:inputfield value="{!Quote.Name}"></apex:inputfield>  
    <apex:outputField value="{!opp1.AccountId}" > </apex:outputField>
    <apex:inputField value="{!Quote.Proposal_Price__c}"  rendered="{!Quote.RecordType.Name='Lump Sum Proposal'}" required="true"/>  
    <apex:inputField value="{!Quote.Proposal_Price__c}"  rendered="{!Quote.RecordTypeID='012i0000001AXkl'}" required="true"/>
    <apex:inputField value="{!Quote.Proposal_Price__c}"  rendered="{!Quote.RecordType.Name='Lump Sum Proposal TEST VF'}" required="true"/>  
    <apex:inputField value="{!Quote.Proposal_Price__c}"  rendered="{!Quote.RecordTypeID='0123B0000008aYW'}" required="true"/>          
    <apex:inputField value="{!Quote.Unit_Price__c}"  rendered="{!Quote.RecordType.Name='Unit Price Proposal'}" required="true"/>
    <apex:inputField value="{!Quote.Unit_Price__c}"  rendered="{!Quote.RecordTypeID='012i0000001AXkn'}" required="true"/>
    <apex:outputField value="{!Quote.OpportunityID}"> </apex:outputField>            
    <apex:inputField value="{!Quote.Unit_of_Measure__c}" rendered="{!Quote.RecordType.Name='Unit Price Proposal'}" required="true"/>
    <apex:inputField value="{!Quote.Unit_of_Measure__c}"  rendered="{!Quote.RecordTypeID='012i0000001AXkn'}" required="true"/>
    <apex:inputfield value="{!Quote.Expiration_Interval__c}"  required="true"></apex:inputfield>
    <apex:inputfield value="{!Quote.Expiration_Date__c}" ></apex:inputfield>
    <apex:inputfield value="{!Quote.Additional_Charges_to_be_Included_in_SOW__c}"></apex:inputfield>  
    <apex:outputtext value=""></apex:outputtext>     
</apex:pageblocksection>
 
<apex:pageblocksection id="ContactInformationPBS" title="Contact Information">
     <apex:inputField value="{!Quote.ContactId}" ></apex:inputField>
      <apex:outputfield value="{!Quote.Contact.Phone}" ></apex:outputfield>
   <apex:outputfield value="{!Quote.Contact.Email}"></apex:outputfield> 
   <apex:outputfield value="{!Quote.Contact.Fax}" ></apex:outputfield> 
</apex:pageblocksection>
 
<apex:pageblocksection id="ScopeofWorkPBS" columns="1" title="Scope of Work">
<apex:inputTextArea value="{!Quote.Scope_of_Work__c}" label="" styleclass="ckeditor" richtext="false" required="true"/>
</apex:pageblocksection>
 
<apex:pageblocksection id="QuoteAdditionalFeesorChargesPBS" title="Additional Fees or Charges">
        <apex:inputfield value="{!Quote.Minimum_Charge__c}"></apex:inputfield>  
  </apex:pageblocksection>
 
<apex:pageblocksection id="ConditionsExclusionsPBS"  title="Exclusions and Conditions" columns="2">
<apex:pageblockSectionItem >
<apex:inputTextarea value="{!Quote.Conditions_Exclusions__c}"  cols="150" rows="25" required="true" label="Exclusions and Conditions"/>
</apex:pageblockSectionItem>
</apex:pageblocksection>
 
</apex:pageBlock>
</apex:form>
</apex:page>
 
Since the Opportunity Contact Roles related list is not natively customizable, I took the advice of someone on the Communities and created a VisualForce page for the Opportunity Contact Roles to be able to pull the Mobile phone number field into the related list. That worked fine, except when I needed to add the Del link next to the Edit link so we can remove Contact from Opportunity Role that are no longer with the company and/or are no longer a Role in an Opportunity (screenshot below).

User-added image
Someone on the Community helped me with the VF code and also gave me some code to create a Controller. I followed the instructions, however I'm still getting the SObject row was retrieved via SOQL without querying the requested field: Contact.Account error. Pasted below is the code for both the VF page and the Controller. Can someone please tell me what I'm missing or doing wrong? Any help and/or advice on this will be most appreciated!

VF Page Code
<apex:page standardController="Opportunity" extensions="DeletePage" id="opfrm" >
    <apex:form id="form">  
        <apex:pageBlock title="Contact Roles">
            <apex:pageBlockTable value="{!opt}" var="ContactRole" id="pgblktab">
                <apex:column >
                    <apex:facet name="header">
                        Action
                    </apex:facet>
                    <a href="/p/opp/ContactRoleEditUi/e?oppid={!Opportunity.Id}&retURL=%2F{!Opportunity.Id}" target="_top">Edit</a>  |
                 <a href="javascript:if (window.confirm('Are you sure?')) Deleteopt('{!ContactRole.Id}');" style="font-weight:bold">Del</a>
                   </apex:column>
                <apex:column >
                    <apex:facet name="header"> Contact Name </apex:facet>
                    <a href="/{!ContactRole.Contact.Id}" target="_top">{!ContactRole.Contact.Name} </a>
                    </apex:column>
                <apex:column value="{!ContactRole.Contact.Account.Name}" headerValue="Account Name"/>
                <apex:column value="{!ContactRole.Contact.Email}" headerValue="Email"/>
                <apex:column value="{!ContactRole.Contact.Phone}" headerValue="Phone"/>
               <!-- <apex:column value="{!ContactRole.Role}" headerValue="Role"/>
<apex:column value="{!ContactRole.Contact.MobilePhone}" headerValue="Mobile"/>
            -->
<apex:column value="{!ContactRole.IsPrimary}" headerValue="Is Primary"/>
            </apex:pageBlockTable>  
            <apex:pageBlockButtons location="top">
                <input type="button" class="btn" value="New" onclick="javascript:window.open('/p/opp/ContactRoleEditUi/e?oppid={!Opportunity.Id}&retURL=%2F{!Opportunity.Id}');"/>
            </apex:pageBlockButtons>     
        </apex:pageBlock>  
          <apex:actionFunction action="{!Deleteopt}" name="Deleteopt" reRender="form">
         <apex:param name="OpportunityContactRoles" value="" assignTo="{!SelectedoptId}"/>
        </apex:actionFunction>       
    </apex:form>
</apex:page>

Controller Code
public with sharing class DeletePage {

   public List<OpportunityContactRole> opt{ get; set; }
  
 
   public string SelectedoptId { get; set; }
   public DeletePage(ApexPages.StandardController controller) {
    LoadData();
    }

   private void LoadData() {
       opt= [Select id,ContactId,IsPrimary,Contact.Name from OpportunityContactRole limit 20];
          }
  
   public pagereference Deleteopt()
   {
      // if for any reason we are missing the reference 
      if (SelectedoptId == null) {
      
         return null;
      }
     
      OpportunityContactRole  tobeDeleted = null;
      for(OpportunityContactRole a : opt)
       if (a.Id == SelectedoptId ) {
          tobeDeleted = a;
          System.debug('#############'+ a);
          break;
       }
      
      if (tobeDeleted != null) {
      Delete tobeDeleted;
      

      }
      LoadData();
      return null;
   } 
 
}

 

                    
 

 
I recently posted a question about the VF code for customizing the Opportunity Contact Roles to show additional Contact fields. Karanrajs very graciously fixed my code to show what I needed (thread like below)

https://developer.salesforce.com/forums/?id=906F0000000kB3NIAU

I now need to add the Del function to my VF Contact Roles page. I tried playing around with code a bit and I got the Del link to show up, however it gives the URL not found error. 

User-added image

Any help or advice will be most appreciated!

Thanks!
I needed to be able to customize the fields visible on the Contact Role Opportunity related list to add the Contact Mobile Phone. I searched Answers and the famous Deepak came up with a brillant work-around solution using VisualForce (see link to the original thread below).

https://success.salesforce.com/answers?id=90630000000hp0AAAQ

I used the VF code he provided and modified it to pull in the Contact Mobile Phone into the Contact Roles related list on the Opportunity. It works perfectly except for a couple of things:
  • When I click to add a New Contact Role in the new VF page on the Opportunity, it pulls it in within the full SF tab and sidebar window (see screen shot below).
  • There is no link to the Contact record in the VF Contact Role related list (see screen shot below).
Add New Contact Role Opens in the full SF tab and sidebar window Shot
User-added image

VF Contact Role has no link to the Contact record​
User-added image


Does anyone know if is there a way to modify the VF code Deepak provided to resolve these two issues? 

Any help or advice will be most appreciated!

Thanks!