You need to sign in to do that
Don't have an account?
Mike Fitch
Error: Id not specified in an update call
Hello everyone,
I created a VF form for my org, which i created a custom object for, and some of my users are getting an error when trying to create a new form from an opportunity related list. If they create it directly from the custom object tab then there isnt any problems. The error is 'Id not specified in an update call'. I have 2 different profiles that use this form and only one of the profiles recieves this error. The other profile has no problem. I will post the code for the form if need be, however it consists of 5 different VF pages, an apex class and the test class to go along with it. I didnt want to post all of the code and confuse anyone if the problem was some salesforce setting or declaritive change that i can make, but i will post the code if necessary. The two profiles have different page layouts for most if not all objects as well as different custom fields, but the custom fields related to the form are identical as are any cross object lookups used by the form. I will post any information or code needed, but like i said earlier, i didnt want to post hundreds of lines of code and confuse anyone. Please advice as soon as possible.
Thanks
I created a VF form for my org, which i created a custom object for, and some of my users are getting an error when trying to create a new form from an opportunity related list. If they create it directly from the custom object tab then there isnt any problems. The error is 'Id not specified in an update call'. I have 2 different profiles that use this form and only one of the profiles recieves this error. The other profile has no problem. I will post the code for the form if need be, however it consists of 5 different VF pages, an apex class and the test class to go along with it. I didnt want to post all of the code and confuse anyone if the problem was some salesforce setting or declaritive change that i can make, but i will post the code if necessary. The two profiles have different page layouts for most if not all objects as well as different custom fields, but the custom fields related to the form are identical as are any cross object lookups used by the form. I will post any information or code needed, but like i said earlier, i didnt want to post hundreds of lines of code and confuse anyone. Please advice as soon as possible.
Thanks
All Answers
VF Page for NEW Records:
<apex:page title="PreCall Plan SP" standardController="Precall_Plan_2__c" extensions="PcPContactInfo">
<apex:sectionHeader subtitle="PreCall Plan SP" title="PreCall Plan information"/>
<apex:pageMessages id="msgs"/>
<apex:form id="PrecallForm">
<apex:pageBlock title="PreCall Planning Worksheet">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
<apex:commandLink value="Print This Form" onclick="window.print();"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="1">
<p><apex:inputField value="{!Precall_Plan_2__c.Name}" required="true"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Salesperson_Name__c}"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Company_Name__c}"/></p>
<apex:pageBlockSectionItem >
<apex:outputLabel value="{!$ObjectType.Precall_Plan_2__c.fields.Contact_Name__c.label}" />
<apex:actionregion >
<apex:inputField value="{!c.Contact_Name__c}" required="true" id="UserName">
<apex:actionSupport event="onchange" action="{!doSomething}" rerender="PrecallForm,msgs"/>
</apex:inputField>
</apex:actionregion>
</apex:pageBlockSectionItem>
<p><apex:inputField value="{!Precall_Plan_2__c.Opportunity__c}"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Funnel_Stage__c}"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Date_of_Report__c}"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Date_of_Prior_Meeting__c}"/></p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Precall Planning Checklist" columns="1">
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox1__c}" label="Is the individual I'm meeting with the individual responsible for decision making?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox2__c}" label="Have I scheduled the appointment with this individual?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox3__c}" label="Have I prequalified this lead effectively?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox4__c}" label="Do I have a full understanding of competitor's products (advantages/disadvantages) being pitched to this customer?"/></p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Precall Planning Questions" columns="1">
<p><apex:inputField value="{!Precall_Plan_2__c.Question1__c}" label="What is my long range sales target for this account?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question2__c}" label="What is my specific objective for this call?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question3__c}" label="What do I plan to show? (Product, demo, sample, chart, etc.)"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question4__c}" label="Who or What is your competition and what are their disadvantages? What is their primary advantage?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question5__c}" label="What benefit or solution can you provide to this customer?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question6__c}" label="What is the monetized value of your solution?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question7__c}" label="What is your 'TARGETED BENEFIT STATEMENT?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question8__c}" label="What needs analysis questions do you intend to ask?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question9__c}" label="What is your sellers leverage?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question10__c}" label="What objections do you anticipate?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question11__c}" label="How do you plan to overcome these objections?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question12__c}" label="What closing techniques/statements will you use?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question13__c}" label="What potential value can you bring to this customer?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question14__c}" label="Who else is on this call and what is their role?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question15__c}" label="In 30 words or less, define the account strategy; include necessary resources to support."/></p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Precall Plan Reminders">
<h1>REMEMBER</h1>
<p>CLARIFY: Clarify and confirm key pieces of your conversation</p>
<p>CONSENSUS: Define the forward moving action plan with responsibilities for both parties</p>
<p>CONFIRM: Make sure you and your customer agree on the plan forward</p>
<p>DELIVER: Deliver on your commitments and follow up on theirs if they are late</p>
</apex:pageBlockSection>
</apex:pageBlock>
<!---<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
<apex:commandLink value="Print This Form" onclick="window.print();"/>-->
</apex:form>
</apex:page>
VF Page for New Records Clone:
<apex:page title="PreCall Plan SP" standardController="Precall_Plan_2__c" contentType="" extensions="PcPContactInfo">
<apex:sectionHeader subtitle="PreCall Plan SP" title="PreCall Plan information"/>
<apex:pageMessages id="msgs"/>
<apex:form id="PrecallForm">
<apex:pageBlock title="PreCall Planning Worksheet">
<center>
<apex:commandButton action="{!dosave}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</center>
<br></br>
<apex:pageBlockSection columns="2">
<!--- <apex:pageBlockSectionItem >
<apex:outputLabel value="{!$ObjectType.Communication__c.fields.UserName__c.label}" />
<apex:actionregion >
<apex:inputField value="{!c.Contact_name2__c}" required="true" id="UserName">
<apex:actionSupport event="onchange" action="{!doSomething}" rerender="AgentsSection, msgs"/>
</apex:inputField>
</apex:actionregion>
</apex:pageBlockSectionItem>-->
</apex:pageBlockSection>
<apex:pageBlockSection columns="1" collapsible="true" >
<apex:inputField value="{!Precall_Plan_2__c.name}" required="true"/>
<apex:inputField value="{!Precall_Plan_2__c.Company_Name__c}" />
<apex:inputField value="{!Precall_Plan_2__c.Salesperson_Name__c}"/>
<!--<apex:inputField value="{!Precall_Plan_2__c.Company_Name__c}"/>-->
<apex:inputField value="{!Precall_Plan_2__c.Opportunity__c}"/>
<apex:inputField value="{!Precall_Plan_2__c.Funnel_Stage__c}"/>
<apex:inputField value="{!Precall_Plan_2__c.Date_of_Report__c}"/>
<apex:inputField value="{!Precall_Plan_2__c.Date_of_Prior_Meeting__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock title="Contact Info">
<apex:pageBlockSection columns="2">
<apex:pageBlockSectionItem >
<apex:outputLabel value="{!$ObjectType.Precall_Plan_2__c.fields.Contact_name2__c.label}" />
<apex:actionregion >
<apex:inputField value="{!Precall_Plan_2__c.Contact_name2__c}" required="true" id="UserName">
<apex:actionSupport event="onchange" action="{!doSomething}" rerender="AgentsSection2, msgs"/>
</apex:inputField>
</apex:actionregion>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSection columns="1" collapsible="false" id="AgentsSection2" >
<apex:outputField value="{!Precall_Plan_2__c.Contact_State__c}" id="email2"/>
<apex:outputField value="{!Precall_Plan_2__c.Contact_mailing_city__c}" id="lname"/>
<apex:outputField value="{!Precall_Plan_2__c.Contact_s_Telephone_Number__c}" id="cmt"/>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock >
<apex:pageBlockSection title="Precall Planning Checklist" columns="1">
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox1__c}" label="Is the individual I'm meeting with the individual responsible for decision making?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox2__c}" label="Have I scheduled the appointment with this individual?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox3__c}" label="Have I prequalified this lead effectively?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox4__c}" label="Do I have a full understanding of competitor's products (advantages/disadvantages) being pitched to this customer?"/></p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Precall Planning Questions" columns="1">
<p><apex:inputField value="{!Precall_Plan_2__c.Question1__c}" label="What is my long range sales target for this account?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question2__c}" label="What is my specific objective for this call?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question3__c}" label="What do I plan to show? (Product, demo, sample, chart, etc.)"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question4__c}" label="Who or What is your competition and what are their disadvantages? What is their primary advantage?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question5__c}" label="What benefit or solution can you provide to this customer?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question6__c}" label="What is the monetized value of your solution?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question7__c}" label="What is your 'TARGETED BENEFIT STATEMENT'?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question8__c}" label="What needs analysis questions do you intend to ask?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question9__c}" label="What is your sellers leverage?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question10__c}" label="What objections do you anticipate?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question11__c}" label="How do you plan to overcome these objections?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question12__c}" label="What closing techniques/statements will you use?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question13__c}" label="What potential value can you bring to this customer?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question14__c}" label="Who else is on this call and what is their role?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question15__c}" label="In 30 words or less, define the account strategy; include necessary resources to support."/></p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Precall Plan Reminders">
<h1>REMEMBER</h1>
<p>CLARIFY: Clarify and confirm key pieces of your conversation</p>
<p>CONSENSUS: Define the forward moving action plan with responsibilities for both parties</p>
<p>CONFIRM: Make sure you and your customer agree on the plan forward</p>
<p>DELIVER: Deliver on your commitments and follow up on theirs if they are late</p>
</apex:pageBlockSection>
<center>
<apex:commandButton action="{!dosave}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</center>
<br></br>
</apex:pageBlock>
<!---<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
<apex:commandLink value="Print This Form" onclick="window.print();"/>-->
</apex:form>
</apex:page>
<apex:page standardController="Precall_Plan_2__c" extensions="PcPContactInfo">
<apex:form id="PrecallForm">
<apex:pageBlock title="PreCall Planning Worksheet" >
<center>
<apex:commandButton action="{!edit}" value="Edit"/>
<apex:commandButton action="{!delete}" value="Delete"/>
<!--- <apex:commandButton value="Clone" action="{!URLFOR($Action.Precall_Plan_2__c.Clone,Precall_Plan_2__c.id)}"/>-->
<apex:commandButton action="{!logout}" value="Clone"/>
<apex:commandLink value="Print This Form" onclick="window.print();"/>
</center>
<apex:pageBlockSection columns="1">
<p><apex:outputField value="{!Precall_Plan_2__c.Name}"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Salesperson_Name__c}"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Company_Name__c}"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Contact_name2__c}"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Contact_s_Title__c}"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Contact_s_Telephone_Number__c}"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Contact_Street__c}"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Contact_mailing_city__c}"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Contact_State__c}"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Contact_Zip__c}"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Opportunity__c}"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Funnel_Stage__c}"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Date_of_Report__c}"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Date_of_Prior_Meeting__c}"/></p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Precall Planning Checklist" columns="1">
<p><apex:outputField value="{!Precall_Plan_2__c.Checkbox1__c}" label="Is the individual I'm meeting with the individual responsible for decision making?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Checkbox2__c}" label="Have I scheduled the appointment with this individual?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Checkbox3__c}" label="Have I prequalified this lead effectively?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Checkbox4__c}" label="Do I have a full understanding of competitor's products (advantages/disadvantages) being pitched to this customer?"/></p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Precall Planning Questions" columns="1">
<p><apex:outputField value="{!Precall_Plan_2__c.Question1__c}" label="What is my long range sales target for this account?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question2__c}" label="What is my specific objective for this call?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question3__c}" label="What do I plan to show? (Product, demo, sample, chart, etc.)"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question4__c}" label="Who or What is your competition and what are their disadvantages? What is their primary advantage?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question5__c}" label="What benefit or solution can you provide to this customer?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question6__c}" label="What is the monetized value of your solution?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question7__c}" label="What is your 'TARGETED BENEFIT STATEMENT'?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question8__c}" label="What needs analysis questions do you intend to ask?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question9__c}" label="What is your sellers leverage?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question10__c}" label="What objections do you anticipate?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question11__c}" label="How do you plan to overcome these objections?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question12__c}" label="What closing techniques/statements will you use?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question13__c}" label="What potential value can you bring to this customer?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question14__c}" label="Who else is on this call and what is their role?"/></p>
<p><apex:outputField value="{!Precall_Plan_2__c.Question15__c}" label="In 30 words or less, define the account strategy; include necessary resources to support."/></p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Precall Plan Reminders">
<h1>REMEMBER</h1>
<p>CLARIFY: Clarify and confirm key pieces of your conversation</p>
<p>CONSENSUS: Define the forward moving action plan with responsibilities for both parties</p>
<p>CONFIRM: Make sure you and your customer agree on the plan forward</p>
<p>DELIVER: Deliver on your commitments and follow up on theirs if they are late</p>
</apex:pageBlockSection>
</apex:pageBlock>
<center>
<apex:commandButton action="{!edit}" value="Edit"/>
<apex:commandButton action="{!delete}" value="Delete"/>
<apex:commandButton value="Clone" action="{!URLFOR($Action.Precall_Plan_2__c.Clone,Precall_Plan_2__c.id)}"/>
<apex:commandLink value="Print This Form" onclick="window.print();"/>
</center>
</apex:form>
</apex:page>
VF Page for Detail Clone:
<apex:page title="PreCall Plan SP" standardController="Precall_Plan_2__c" contentType="" extensions="PcPContactInfo">
<apex:sectionHeader subtitle="PreCall Plan SP" title="PreCall Plan information"/>
<apex:pageMessages id="msgs"/>
<apex:form id="PrecallForm">
<apex:pageBlock title="PreCall Planning Worksheet">
<center>
<apex:commandButton action="{!dosave}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</center>
<br></br>
<apex:pageBlockSection columns="2">
<!--- <apex:pageBlockSectionItem >
<apex:outputLabel value="{!$ObjectType.Communication__c.fields.UserName__c.label}" />
<apex:actionregion >
<apex:inputField value="{!c.Contact_name2__c}" required="true" id="UserName">
<apex:actionSupport event="onchange" action="{!doSomething}" rerender="AgentsSection, msgs"/>
</apex:inputField>
</apex:actionregion>
</apex:pageBlockSectionItem>-->
</apex:pageBlockSection>
<apex:pageBlockSection columns="1" collapsible="true" >
<apex:inputField value="{!Precall_Plan_2__c.name}" required="true"/>
<apex:inputField value="{!Precall_Plan_2__c.Company_Name__c}" />
<apex:inputField value="{!Precall_Plan_2__c.Salesperson_Name__c}"/>
<!--<apex:inputField value="{!Precall_Plan_2__c.Company_Name__c}"/>-->
<apex:inputField value="{!Precall_Plan_2__c.Opportunity__c}"/>
<apex:inputField value="{!Precall_Plan_2__c.Funnel_Stage__c}"/>
<apex:inputField value="{!Precall_Plan_2__c.Date_of_Report__c}"/>
<apex:inputField value="{!Precall_Plan_2__c.Date_of_Prior_Meeting__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock title="Contact Info">
<apex:pageBlockSection columns="2">
<apex:pageBlockSectionItem >
<apex:outputLabel value="{!$ObjectType.Precall_Plan_2__c.fields.Contact_name2__c.label}" />
<apex:actionregion >
<apex:inputField value="{!Precall_Plan_2__c.Contact_name2__c}" required="true" id="UserName">
<apex:actionSupport event="onchange" action="{!doSomething}" rerender="AgentsSection2, msgs"/>
</apex:inputField>
</apex:actionregion>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSection columns="1" collapsible="false" id="AgentsSection2" >
<apex:outputField value="{!Precall_Plan_2__c.Contact_State__c}" id="email2"/>
<apex:outputField value="{!Precall_Plan_2__c.Contact_mailing_city__c}" id="lname"/>
<apex:outputField value="{!Precall_Plan_2__c.Contact_s_Telephone_Number__c}" id="cmt"/>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock >
<apex:pageBlockSection title="Precall Planning Checklist" columns="1">
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox1__c}" label="Is the individual I'm meeting with the individual responsible for decision making?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox2__c}" label="Have I scheduled the appointment with this individual?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox3__c}" label="Have I prequalified this lead effectively?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox4__c}" label="Do I have a full understanding of competitor's products (advantages/disadvantages) being pitched to this customer?"/></p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Precall Planning Questions" columns="1">
<p><apex:inputField value="{!Precall_Plan_2__c.Question1__c}" label="What is my long range sales target for this account?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question2__c}" label="What is my specific objective for this call?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question3__c}" label="What do I plan to show? (Product, demo, sample, chart, etc.)"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question4__c}" label="Who or What is your competition and what are their disadvantages? What is their primary advantage?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question5__c}" label="What benefit or solution can you provide to this customer?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question6__c}" label="What is the monetized value of your solution?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question7__c}" label="What is your 'TARGETED BENEFIT STATEMENT'?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question8__c}" label="What needs analysis questions do you intend to ask?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question9__c}" label="What is your sellers leverage?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question10__c}" label="What objections do you anticipate?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question11__c}" label="How do you plan to overcome these objections?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question12__c}" label="What closing techniques/statements will you use?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question13__c}" label="What potential value can you bring to this customer?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question14__c}" label="Who else is on this call and what is their role?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question15__c}" label="In 30 words or less, define the account strategy; include necessary resources to support."/></p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Precall Plan Reminders">
<h1>REMEMBER</h1>
<p>CLARIFY: Clarify and confirm key pieces of your conversation</p>
<p>CONSENSUS: Define the forward moving action plan with responsibilities for both parties</p>
<p>CONFIRM: Make sure you and your customer agree on the plan forward</p>
<p>DELIVER: Deliver on your commitments and follow up on theirs if they are late</p>
</apex:pageBlockSection>
<center>
<apex:commandButton action="{!dosave}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</center>
<br></br>
</apex:pageBlock>
<!---<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
<apex:commandLink value="Print This Form" onclick="window.print();"/>-->
</apex:form>
</apex:page>
<apex:page title="PreCall Plan SP" standardController="Precall_Plan_2__c" contentType="" extensions="PcPContactInfo">
<apex:sectionHeader subtitle="PreCall Plan SP" title="PreCall Plan information"/>
<apex:pageMessages id="msgs"/>
<apex:form id="PrecallForm">
<apex:pageBlock title="PreCall Planning Worksheet">
<center>
<apex:commandButton action="{!dosave}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</center>
<br></br>
<apex:pageBlockSection columns="2">
<!--- <apex:pageBlockSectionItem >
<apex:outputLabel value="{!$ObjectType.Communication__c.fields.UserName__c.label}" />
<apex:actionregion >
<apex:inputField value="{!c.Contact_name2__c}" required="true" id="UserName">
<apex:actionSupport event="onchange" action="{!doSomething}" rerender="AgentsSection, msgs"/>
</apex:inputField>
</apex:actionregion>
</apex:pageBlockSectionItem>-->
</apex:pageBlockSection>
<apex:pageBlockSection columns="1" collapsible="true" >
<apex:inputField value="{!Precall_Plan_2__c.name}" required="true"/>
<apex:inputField value="{!Precall_Plan_2__c.Company_Name__c}" />
<apex:inputField value="{!Precall_Plan_2__c.Salesperson_Name__c}"/>
<!--<apex:inputField value="{!Precall_Plan_2__c.Company_Name__c}"/>-->
<apex:inputField value="{!Precall_Plan_2__c.Opportunity__c}"/>
<apex:inputField value="{!Precall_Plan_2__c.Funnel_Stage__c}"/>
<apex:inputField value="{!Precall_Plan_2__c.Date_of_Report__c}"/>
<apex:inputField value="{!Precall_Plan_2__c.Date_of_Prior_Meeting__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock title="Contact Info">
<apex:pageBlockSection columns="2">
<apex:pageBlockSectionItem >
<apex:outputLabel value="{!$ObjectType.Precall_Plan_2__c.fields.Contact_name2__c.label}" />
<apex:actionregion >
<apex:inputField value="{!Precall_Plan_2__c.Contact_name2__c}" required="true" id="UserName">
<apex:actionSupport event="onchange" action="{!doSomething}" rerender="AgentsSection2, msgs"/>
</apex:inputField>
</apex:actionregion>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSection columns="1" collapsible="false" id="AgentsSection2" >
<apex:outputField value="{!Precall_Plan_2__c.Contact_State__c}" id="email2"/>
<apex:outputField value="{!Precall_Plan_2__c.Contact_mailing_city__c}" id="lname"/>
<apex:outputField value="{!Precall_Plan_2__c.Contact_s_Telephone_Number__c}" id="cmt"/>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock >
<apex:pageBlockSection title="Precall Planning Checklist" columns="1">
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox1__c}" label="Is the individual I'm meeting with the individual responsible for decision making?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox2__c}" label="Have I scheduled the appointment with this individual?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox3__c}" label="Have I prequalified this lead effectively?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Checkbox4__c}" label="Do I have a full understanding of competitor's products (advantages/disadvantages) being pitched to this customer?"/></p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Precall Planning Questions" columns="1">
<p><apex:inputField value="{!Precall_Plan_2__c.Question1__c}" label="What is my long range sales target for this account?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question2__c}" label="What is my specific objective for this call?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question3__c}" label="What do I plan to show? (Product, demo, sample, chart, etc.)"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question4__c}" label="Who or What is your competition and what are their disadvantages? What is their primary advantage?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question5__c}" label="What benefit or solution can you provide to this customer?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question6__c}" label="What is the monetized value of your solution?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question7__c}" label="What is your 'TARGETED BENEFIT STATEMENT'?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question8__c}" label="What needs analysis questions do you intend to ask?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question9__c}" label="What is your sellers leverage?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question10__c}" label="What objections do you anticipate?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question11__c}" label="How do you plan to overcome these objections?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question12__c}" label="What closing techniques/statements will you use?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question13__c}" label="What potential value can you bring to this customer?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question14__c}" label="Who else is on this call and what is their role?"/></p>
<p><apex:inputField value="{!Precall_Plan_2__c.Question15__c}" label="In 30 words or less, define the account strategy; include necessary resources to support."/></p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Precall Plan Reminders">
<h1>REMEMBER</h1>
<p>CLARIFY: Clarify and confirm key pieces of your conversation</p>
<p>CONSENSUS: Define the forward moving action plan with responsibilities for both parties</p>
<p>CONFIRM: Make sure you and your customer agree on the plan forward</p>
<p>DELIVER: Deliver on your commitments and follow up on theirs if they are late</p>
</apex:pageBlockSection>
<center>
<apex:commandButton action="{!dosave}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</center>
<br></br>
</apex:pageBlock>
<!---<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
<apex:commandLink value="Print This Form" onclick="window.print();"/>-->
</apex:form>
</apex:page>
Apex Class:
public class PcPContactInfo {
public Precall_Plan_2__c c{get; set;}
public PcPContactInfo(ApexPages.StandardController controller)
{
c = (Precall_Plan_2__c)controller.getRecord();
}
public pagereference logout()
{
pagereference p1=new pagereference('/apex/Precall_Plan_Detail_clone?id='+c.get('Id')+'&clone=1');
return p1;
}
public PageReference dosave()
{
try
{
if(ApexPages.currentPage().getParameters().get('clone')=='1'||ApexPages.currentPage().getParameters().get('save_new')=='1')
{
c.id=null;
insert c;
}
else
update c;
}
catch(exception e) { ApexPages.addMessages(e); return null; }
return new Pagereference('/' + c.get('Id'));
}
public void doSomething()
{
contact TEST = [SELECT account.name,MailingCountry,Mailingcity,Title,Phone,MailingStreet,MailingState,MailingPostalCode, accountid FROM contact where id = :c.Contact_name2__c];
// c.Company_Name__c= TEST.account.name;
c.Contact_mailing_city__c=TEST.Mailingcity;
c.Contact_s_Title__c=TEST.Title;
c.Contact_s_Telephone_Number__c=TEST.Phone;
c.Contact_Street__c=TEST.MailingStreet;
c.Contact_State__c=TEST.MailingState;
c.Contact_Zip__c=TEST.MailingPostalCode;
}
}
Apex Test Class:
@isTest
private class test_PcPContactInfo
{
static testMethod void go_PcPContactInfo()
{
account a = new account(name='ESAB');
insert a;
contact c = new contact (lastname= 'test2',accountid=a.id,email='abc@gmail.com');
insert c;
Precall_Plan_2__c cw=new Precall_Plan_2__c(name='test',Contact_name2__c=c.id,Company_Name__c=a.id);
insert cw;
ApexPages.StandardController controller = new ApexPages.StandardController(cw);
PcPContactInfo stdController = new PcPContactInfo(controller);
//account a = [SELECT name,id FROM account limit 1];
//contact TEST = [SELECT id, accountid,email FROM contact where id = :cw.contact__c];
//cw.Email__c = TEST.email;
//update cw;
stdController.doSomething();
stdController.dosave();
}
}
Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: WQXSHQHR