actually i have 2 objects with parent and child reletion ship….and those objects are "EntityRelation__c"(child object)…..and another is "Entity master__c"(parent object)….now i have a requirement like i have to populate "entity maser"fields on my vf page of entity reletion__c that also i need like in edit mode.. so for this i wrote the code like
<apex:page standardController="EntityRelation__c" extensions="entityex" sidebar="false" showHeader="true" >
<apex:form id="theform">
<apex:pageBlock title="Entity Detail">
<apex:pageBlockButtons >
<apex:commandButton value="save" action="{!save}"/>
<apex:commandButton value="save&new" action="{!save}"/>
<apex:commandButton value="cancel" action="{!cancel}"/>
</apex:pageBlockButtons>`
<apex:pageBlockSection title="Entry No" columns="2">
<apex:actionfunction name="nameChanged" action="nameChanged" rerender="theform"/>
<apex:inputField value="{!EntityRelation__c.Entity_Name__c}" required="true" id="entity_id" onchange="nameChanged()">
<apex:actionSupport event="onchange" reRender="salesRepDetails" />
</apex:inputField>
<apex:inputField value="{!EntityMaster__c.Company_Code__c}" required="true"/>
<apex:inputField value="{!EntityMaster__c.Ven_CusNo__c}" required="true"/>
<apex:inputField value="{!EntityMaster__c.GL_Account__c}" required="true"/>
</apex:pageBlockSection>
</apex:pageBlock>ge
</apex:form>
My controller code is the following:
public with sharing class entityex {
public EntityMaster__c emObject{get;set;}
public EntityRelation__c erObject{get;set;}
public entityex (ApexPages.StandardController controller)
{
this.erObject = (EntityRelation__c)controller.getrecord();
}
public void nameChanged()
{
this.emObject = [Select Id,Name,Ven_CusNo__c,GL_Account__c,Company_Code__c from EntityMaster__c Where id = :erObject.Entity_Name__c];
}
}
but am getting error like
" Unknown property 'EntityRelation__cStandardController.EntityMaster__c'"
What does that error mean?
I want to auto populate the four fields on the entity master (parent object) when I select "{!EntityRelation__c.Entity_Name__c}". This is the lookup field to the parent object.
THE ABOVE FOUR FILEDS ALSO THERE ON THE "ENTITY MASTER"(PARENT OBJECT)…..NOW I WANT TO AUTO POPULATE THOSE FIELD WHEN I ONLY SELECT "{!EntityRelation__c.Entity_Name__c}" …ITS LOOK UP FIELD TO PARENT OBJECT
Best Answer
Is it just a typo, or does your code actually have
If thats what it really is in the code, you are missing another underscore
This typo would cause you to get the unknown property error as well