You need to sign in to do that
Don't have an account?
Getting Error - Customer Metric does not exist.
Getting Error - Customer Metric does not exist.
I Want to create a visualforce page "Customer Metric".
I have a customer Metric object with all the field already created on salesforce.
Then i wanted to create a visualforce page for the same to make dynamic page such as shrinking the section.
The code which i created is
<apex:page standardController="Customer Metric" sidebar="false">
<apex:sectionHeader title="Edit Customer Metric" subtitle="{!Customer Metric.name}"/>
<apex:form >
<apex:pageBlock title=" Customer Metric Edit" id="thePageBlock" mode="edit">
<apex:pageMessages />
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:actionRegion >
<apex:pageBlockSection title="Basic Information" columns="1">
<apex:inputField value="{!Customer_Metric.name}"/>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Products"/>
<apex:outputPanel >
<apex:inputField value="{!Customer_Metric.Products}">
<apex:actionSupport event="onchange" rerender="thePageBlock" status="status"/>
</apex:inputField>
<apex:actionStatus startText="applying value..." id="status"/>
</apex:outputPanel>
</apex:pageBlockSectionItem>
<apex:inputField value="{!Customer_Metric.Opportunity_Name__c}"/>
<apex:inputField value="{!Customer_Metric.Solution__c}"/>
<apex:inputField value="{!Customer_Metric.Win_Loss_Status__c}"/>
<apex:inputField value="{!Customer_Metric.Purchasing_Sourcing_Systems__c}"/>
<apex:inputField value="{!Customer_Metric.Geography__c}"/>
<apex:inputField value="{!Customer_Metric.Foreign_Languages__c}"/>
<apex:inputField value="{!Customer_Metric.Competitors__c}"/>
<apex:inputField value="{!Customer_Metric.Business_Challenge__c}"/>
<apex:inputField value="{!Customer_Metric.Employee_Strength__c}"/>
<apex:inputField value="{!Customer_Metric.Address__c}"/>
<apex:inputField value="{!Customer_Metric.Deal_Type__c}"/>
<apex:inputField value="{!Customer_Metric.Customer_Type__c}"/>
<apex:inputField value="{!Customer_Metric.Replacement_Deal__c}"/>
<apex:inputField value="{!Customer_Metric.Project_Team_Lead__c}"/>
<apex:inputField value="{!Customer_Metric.CSM__c}"/>
<apex:inputField value="{!Customer_Metric.Program_Manager__c}"/>
<apex:inputField value="{!Customer_Metric.RSM_Name__c}"/>
<apex:inputField value="{!Customer_Metric.Date__c}"/>
<apex:inputField value="{!Customer_Metric.Industry__c}"/>
<apex:inputField value="{!Customer_Metric.Revenue_Sales__c}"/>
<apex:inputField value="{!Customer_Metric.Number_Of_Sourcing_Systems__c}"/>
<apex:inputField value="{!Customer_Metric.Number_Of_Foreign_Languages__c}"/>
<apex:inputField value="{!Customer_Metric.Financial_Model__c}"/>
<apex:inputField value="{!Customer_Metric.Comments__c}"/>
<apex:inputField value="{!Customer_Metric.Zycus_Value_Proposition__c}"/>
</apex:pageBlockSection>
</apex:actionRegion>
<apex:pageBlockSection title="Length Of Relationship" columns="1" >
<apex:inputField value="{!Customer_Metric.Contract_Start_Date__c}"/>
<apex:inputField value="{!Customer_Metric.Contract_Term__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Spend Analysis" columns="1" rendered="{!Customer_Metric.Products ==
'AutoClass','ACLC','iAnalyze','iCost','iMine'}">
<apex:inputField value="{!Customer_Metric.Contracted_Spend_Cap__c}"/>
<apex:inputField value="{!Customer_Metric.Currency__c}"/>
<apex:inputField value="{!Customer_Metric.Contracted_Users__c}"/>
<apex:inputField value="{!Customer_Metric.Implementation__c}"/>
<apex:inputField value="{!Customer_Metric.Refresh_Frequency__c}"/>
<apex:inputField value="{!Customer_Metric.MM_Frequency__c}"/>
<apex:inputField value="{!Customer_Metric.Taxonomy__c}"/>
<apex:inputField value="{!Customer_Metric.Spend_Volume_in_US_bn__c}"/>
<apex:inputField value="{!Customer_Metric.Use__c}"/>
<apex:inputField value="{!Customer_Metric.Objectives_KPIs__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Supplier Management" columns="1" rendered="{!Customer_Metric.Products == 'SIM'}">
<apex:inputField value="{!Customer_Metric.SIM_User_Licenses__c}"/>
<apex:inputField value="{!Customer_Metric.SIM_Power__c}"/>
<apex:inputField value="{!Customer_Metric.SIM_Business__c}"/>
<apex:inputField value="{!Customer_Metric.SIM_Objectives_KPIs__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Supplier Performance Management" columns="1" rendered="{!Customer_Metric.Products == 'SPM'}">
<apex:inputField value="{!Customer_Metric.SPM_User_Licenses__c}"/>
<apex:inputField value="{!Customer_Metric.SPM_Power__c}"/>
<apex:inputField value="{!Customer_Metric.SPM_Business__c}"/>
<apex:inputField value="{!Customer_Metric.SPM_Objectives_KPIs__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="eSourcing" columns="1" rendered="{!Customer_Metric.Products == 'iSource','iManage'}">
<apex:inputField value="{!Customer_Metric.Sourcing_Management_User_Licenses__c}"/>
<apex:inputField value="{!Customer_Metric.Sourcing_Management_Business__c}"/>
<apex:inputField value="{!Customer_Metric.Sourcing_Management_Template__c}"/>
<apex:inputField value="{!Customer_Metric.User_Count_Power_Business_Users__c}"/>
<apex:inputField value="{!Customer_Metric.Categories__c}"/>
<apex:inputField value="{!Customer_Metric.Supplier_Count__c}"/>
<apex:inputField value="{!Customer_Metric.Event_Type__c}"/>
<apex:inputField value="{!Customer_Metric.Sourcing_Management_Objectives_KPIs__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Contract Management" columns="1" rendered="{!Customer_Metric.Products == 'iContract'}">
<apex:inputField value="{!Customer_Metric.Contract_Management_User_Licenses__c}"/>
<apex:inputField value="{!Customer_Metric.Contract_Management_Power__c}"/>
<apex:inputField value="{!Customer_Metric.Contract_Management_Business__c}"/>
<apex:inputField value="{!Customer_Metric.Contract_Management_Objectives_KPIs__c}"/>
<apex:inputField value="{!Customer_Metric.User_Count_Authority_Repository_Users__c}"/>
<apex:inputField value="{!Customer_Metric.Number_Of_Contracts__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
But i am getting a error as "Customer metric does not exist"
Any suggestion??
Regards,
Samuel
U pls check the controller name and object name........its smething mistake u mentioned in vf page
Thanks for reply Subra...
But its the same
Standard controller name is "Customer Metric" and Object name is also "Customer Metric".
Regards,
Samuel
Any Suggestions??
Hi Subra,
Thanks for the reply.
Actually i am new to this Apex and visualforce.
Can you pls help me with the code i pasted..by making the neccessary changes.
I am trying to make a page of this customer Metric object as dynamic.
When the particular product is selected - The section colapse/shrink .
The product field is a multi - picklist field. so they can select multiple product too.
Thanks in advance
Regards,
Samuel
<apex:sectionHeader title="Edit Customer Metric" subtitle="{!Customer_Metric__c.name}"/>
<apex:form >
<apex:pageBlock title=" Customer Metric Edit" id="thePageBlock" mode="edit">
<apex:pageMessages />
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:actionRegion >
<apex:pageBlockSection title="Basic Information" columns="1">
<apex:inputField value="{!Customer_Metric__c.name}"/>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Products"/>
<apex:outputPanel >
<apex:inputField value="{!Customer_Metric__c.Products}">
<apex:actionSupport event="onchange" rerender="thePageBlock" status="status"/>
</apex:inputField>
<apex:actionStatus startText="applying value..." id="status"/>
</apex:outputPanel>
</apex:pageBlockSectionItem>
<apex:inputField value="{!Customer_Metric.Opportunity_Name__c}"/>
<apex:inputField value="{!Customer_Metric__c.Solution__c}"/>
<apex:inputField value="{!Customer_Metric__c.Win_Loss_Status__c}"/>
<apex:inputField value="{!Customer_Metric__c.Purchasing_Sourcing_Systems__c}"/>
<apex:inputField value="{!Customer_Metric__c.Geography__c}"/>
<apex:inputField value="{!Customer_Metric__c.Foreign_Languages__c}"/>
<apex:inputField value="{!Customer_Metric__c.Competitors__c}"/>
<apex:inputField value="{!Customer_Metric__c.Business_Challenge__c}"/>
<apex:inputField value="{!Customer_Metric__c.Employee_Strength__c}"/>
<apex:inputField value="{!Customer_Metric__c.Address__c}"/>
<apex:inputField value="{!Customer_Metric__c.Deal_Type__c}"/>
<apex:inputField value="{!Customer_Metric__c.Customer_Type__c}"/>
<apex:inputField value="{!Customer_Metric__c.Replacement_Deal__c}"/>
<apex:inputField value="{!Customer_Metric__c.Project_Team_Lead__c}"/>
<apex:inputField value="{!Customer_Metric__c.CSM__c}"/>
<apex:inputField value="{!Customer_Metric__c.Program_Manager__c}"/>
<apex:inputField value="{!Customer_Metric__c.RSM_Name__c}"/>
<apex:inputField value="{!Customer_Metric__c.Date__c}"/>
<apex:inputField value="{!Customer_Metric__c.Industry__c}"/>
<apex:inputField value="{!Customer_Metric__c.Revenue_Sales__c}"/>
<apex:inputField value="{!Customer_Metric__c.Number_Of_Sourcing_Systems__c}"/>
<apex:inputField value="{!Customer_Metric__c.Number_Of_Foreign_Languages__c}"/>
<apex:inputField value="{!Customer_Metric__c.Financial_Model__c}"/>
<apex:inputField value="{!Customer_Metric__c.Comments__c}"/>
<apex:inputField value="{!Customer_Metric__c.Zycus_Value_Proposition__c}"/>
</apex:pageBlockSection>
</apex:actionRegion>
<apex:pageBlockSection title="Length Of Relationship" columns="1" >
<apex:inputField value="{!Customer_Metric__c.Contract_Start_Date__c}"/>
<apex:inputField value="{!Customer_Metric__c.Contract_Term__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Spend Analysis" columns="1" rendered="{!Customer_Metric__c.Products ==
'AutoClass','ACLC','iAnalyze','iCost','iMine'}">
<apex:inputField value="{!Customer_Metric__c.Contracted_Spend_Cap__c}"/>
<apex:inputField value="{!Customer_Metric__c.Currency__c}"/>
<apex:inputField value="{!Customer_Metric__c.Contracted_Users__c}"/>
<apex:inputField value="{!Customer_Metric__c.Implementation__c}"/>
<apex:inputField value="{!Customer_Metric__c.Refresh_Frequency__c}"/>
<apex:inputField value="{!Customer_Metric__c.MM_Frequency__c}"/>
<apex:inputField value="{!Customer_Metric__c.Taxonomy__c}"/>
<apex:inputField value="{!Customer_Metric__c.Spend_Volume_in_US_bn__c}"/>
<apex:inputField value="{!Customer_Metric__c.Use__c}"/>
<apex:inputField value="{!Customer_Metric__c.Objectives_KPIs__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Supplier Management" columns="1" rendered="{!Customer_Metric__c.Products == 'SIM'}">
<apex:inputField value="{!Customer_Metric__c.SIM_User_Licenses__c}"/>
<apex:inputField value="{!Customer_Metric__c.SIM_Power__c}"/>
<apex:inputField value="{!Customer_Metric__c.SIM_Business__c}"/>
<apex:inputField value="{!Customer_Metric__c.SIM_Objectives_KPIs__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Supplier Performance Management" columns="1" rendered="{!Customer_Metric__c.Products == 'SPM'}">
<apex:inputField value="{!Customer_Metric__c.SPM_User_Licenses__c}"/>
<apex:inputField value="{!Customer_Metric__c.SPM_Power__c}"/>
<apex:inputField value="{!Customer_Metric__c.SPM_Business__c}"/>
<apex:inputField value="{!Customer_Metric__c.SPM_Objectives_KPIs__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="eSourcing" columns="1" rendered="{!Customer_Metric__c.Products == 'iSource','iManage'}">
<apex:inputField value="{!Customer_Metric__c.Sourcing_Management_User_Licenses__c}"/>
<apex:inputField value="{!Customer_Metric__c.Sourcing_Management_Business__c}"/>
<apex:inputField value="{!Customer_Metric__c.Sourcing_Management_Template__c}"/>
<apex:inputField value="{!Customer_Metric__c.User_Count_Power_Business_Users__c}"/>
<apex:inputField value="{!Customer_Metric__c.Categories__c}"/>
<apex:inputField value="{!Customer_Metric__c.Supplier_Count__c}"/>
<apex:inputField value="{!Customer_Metric__c.Event_Type__c}"/>
<apex:inputField value="{!Customer_Metric__c.Sourcing_Management_Objectives_KPIs__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Contract Management" columns="1" rendered="{!Customer_Metric__c.Products == 'iContract'}">
<apex:inputField value="{!Customer_Metric__c.Contract_Management_User_Licenses__c}"/>
<apex:inputField value="{!Customer_Metric__c.Contract_Management_Power__c}"/>
<apex:inputField value="{!Customer_Metric__c.Contract_Management_Business__c}"/>
<apex:inputField value="{!Customer_Metric__c.Contract_Management_Objectives_KPIs__c}"/>
<apex:inputField value="{!Customer_Metric__c.User_Count_Authority_Repository_Users__c}"/>
<apex:inputField value="{!Customer_Metric__c.Number_Of_Contracts__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Hi Subra,
getting this below error
Error: Could not resolve field 'Products' from <apex:inputField> value binding '{!Customer_Metric__c.Products}' in page Customer_Metric
could you pls help me with this...and other errors
Use Customer_Metric__c.Products__c instead of Customer_Metric__c.Products
No Subra,
Its a Multi - Picklist Field.
Now getting this error
Unknown property 'Customer_Metric__cStandardController.Customer_Metric'
Can you pls check the code and provide me the correct code.
It will really be helpful.
Thanks in advance
Regards,
Samuel
can you please help me out to create a dynamic page...m still getting the same error as object does not found
code as follows:
<apex:page standardController="Customer_Metric_c" sidebar="false">
<apex:sectionHeader title="Edit Customer_Metric_c" subtitle="{!Customer_Metric_c.name}"/>
<apex:form >
<apex:pageBlock title=" Customer Metric Edit" id="thePageBlock" mode="edit">
<apex:pageMessages />
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:actionRegion >
<apex:pageBlockSection title="Basic Information" columns="1">
<apex:inputField value="{!Customer_Metric.name}"/>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Products"/>
<apex:outputPanel >
<apex:inputField value="{!Customer_Metric.Products}">
<apex:actionSupport event="onchange" rerender="thePageBlock" status="status"/>
</apex:inputField>
<apex:actionStatus startText="applying value..." id="status"/>
</apex:outputPanel>
</apex:pageBlockSectionItem>
<apex:inputField value="{!Customer_Metric.Opportunity_Name__c}"/>
<apex:inputField value="{!Customer_Metric.Solution__c}"/>
<apex:inputField value="{!Customer_Metric.Win_Loss_Status__c}"/>
<apex:inputField value="{!Customer_Metric.Purchasing_Sourcing_Systems__c}"/>
<apex:inputField value="{!Customer_Metric.Geography__c}"/>
<apex:inputField value="{!Customer_Metric.Foreign_Languages__c}"/>
<apex:inputField value="{!Customer_Metric.Competitors__c}"/>
<apex:inputField value="{!Customer_Metric.Business_Challenge__c}"/>
<apex:inputField value="{!Customer_Metric.Employee_Strength__c}"/>
<apex:inputField value="{!Customer_Metric.Address__c}"/>
<apex:inputField value="{!Customer_Metric.Deal_Type__c}"/>
<apex:inputField value="{!Customer_Metric.Customer_Type__c}"/>
<apex:inputField value="{!Customer_Metric.Replacement_Deal__c}"/>
<apex:inputField value="{!Customer_Metric.Project_Team_Lead__c}"/>
<apex:inputField value="{!Customer_Metric.CSM__c}"/>
<apex:inputField value="{!Customer_Metric.Program_Manager__c}"/>
<apex:inputField value="{!Customer_Metric.RSM_Name__c}"/>
<apex:inputField value="{!Customer_Metric.Date__c}"/>
<apex:inputField value="{!Customer_Metric.Industry__c}"/>
<apex:inputField value="{!Customer_Metric.Revenue_Sales__c}"/>
<apex:inputField value="{!Customer_Metric.Number_Of_Sourcing_Systems__c}"/>
<apex:inputField value="{!Customer_Metric.Number_Of_Foreign_Languages__c}"/>
<apex:inputField value="{!Customer_Metric.Financial_Model__c}"/>
<apex:inputField value="{!Customer_Metric.Comments__c}"/>
<apex:inputField value="{!Customer_Metric.Zycus_Value_Proposition__c}"/>
</apex:pageBlockSection>
</apex:actionRegion>
<apex:pageBlockSection title="Length Of Relationship" columns="1" >
<apex:inputField value="{!Customer_Metric.Contract_Start_Date__c}"/>
<apex:inputField value="{!Customer_Metric.Contract_Term__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Spend Analysis" columns="1" rendered="{!Customer_Metric.Products == 'AutoClass','ACLC','iAnalyze','iCost','iMine'}">
<apex:inputField value="{!Customer_Metric.Contracted_Spend_Cap__c}"/>
<apex:inputField value="{!Customer_Metric.Currency__c}"/>
<apex:inputField value="{!Customer_Metric.Contracted_Users__c}"/>
<apex:inputField value="{!Customer_Metric.Implementation__c}"/>
<apex:inputField value="{!Customer_Metric.Refresh_Frequency__c}"/>
<apex:inputField value="{!Customer_Metric.MM_Frequency__c}"/>
<apex:inputField value="{!Customer_Metric.Taxonomy__c}"/>
<apex:inputField value="{!Customer_Metric.Spend_Volume_in_US_bn__c}"/>
<apex:inputField value="{!Customer_Metric.Use__c}"/>
<apex:inputField value="{!Customer_Metric.Objectives_KPIs__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Supplier Management" columns="1" rendered="{!Customer_Metric.Products == 'SIM'}">
<apex:inputField value="{!Customer_Metric.SIM_User_Licenses__c}"/>
<apex:inputField value="{!Customer_Metric.SIM_Power__c}"/>
<apex:inputField value="{!Customer_Metric.SIM_Business__c}"/>
<apex:inputField value="{!Customer_Metric.SIM_Objectives_KPIs__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Supplier Performance Management" columns="1" rendered="{!Customer_Metric.Products == 'SPM'}">
<apex:inputField value="{!Customer_Metric.SPM_User_Licenses__c}"/>
<apex:inputField value="{!Customer_Metric.SPM_Power__c}"/>
<apex:inputField value="{!Customer_Metric.SPM_Business__c}"/>
<apex:inputField value="{!Customer_Metric.SPM_Objectives_KPIs__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="eSourcing" columns="1" rendered="{!Customer_Metric.Products == 'iSource','iManage'}">
<apex:inputField value="{!Customer_Metric.Sourcing_Management_User_Licenses__c}"/>
<apex:inputField value="{!Customer_Metric.Sourcing_Management_Business__c}"/>
<apex:inputField value="{!Customer_Metric.Sourcing_Management_Template__c}"/>
<apex:inputField value="{!Customer_Metric.User_Count_Power_Business_Users__c}"/>
<apex:inputField value="{!Customer_Metric.Categories__c}"/>
<apex:inputField value="{!Customer_Metric.Supplier_Count__c}"/>
<apex:inputField value="{!Customer_Metric.Event_Type__c}"/>
<apex:inputField value="{!Customer_Metric.Sourcing_Management_Objectives_KPIs__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Contract Management" columns="1" rendered="{!Customer_Metric.Products == 'iContract'}">
<apex:inputField value="{!Customer_Metric.Contract_Management_User_Licenses__c}"/>
<apex:inputField value="{!Customer_Metric.Contract_Management_Power__c}"/>
<apex:inputField value="{!Customer_Metric.Contract_Management_Business__c}"/>
<apex:inputField value="{!Customer_Metric.Contract_Management_Objectives_KPIs__c}"/>
<apex:inputField value="{!Customer_Metric.User_Count_Authority_Repository_Users__c}"/>
<apex:inputField value="{!Customer_Metric.Number_Of_Contracts__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>