You need to sign in to do that
Don't have an account?
Santosh reddy 14
HI All, I am not able to pass the object lookup field id to component and finally to controller which is showing the id as null
<apex:page standardController="Business_Contract_to_Account__c" standardStylesheets="false">
<apex:sectionHeader title="Account Hierarchy" subtitle="{!Business_Contract_to_Account__c.Name}"/>
<!--<c:HierarchyTreeDragAndDrop currentRecId="{!Account.id}" sObjectTypeName="Account" sObjectFieldsAPINames="Type,Industry" parentIdFieldAPI="parentId" numOfLevels="5"/>
---> "{!Business_Contract_to_Account__c.AccountId__c}"
<apex:pageBlock >
<c:HeirarchyJBTreeV2 currentRecId="{!Business_Contract_to_Account__c.Customer__c}" sObjectTypeName="Business_Contract_to_Account__c" sObjectFieldsAPINames="Customer__r.AccountNumber,Customer__r.SAP_Partner_Functions__c,Customer__r.Store_Number__c,Customer__r.State_City_Country__c,Customer__r.Customer_Reporting_Group__c,Customer__r.Customer_Facing_Parent_Type__c" parentIdFieldAPI="Customer_Facing_Parent__c" displayListSize="700" numOfLevels="5"/>
</apex:pageBlock>
</apex:page>
and the component line is
<apex:attribute name="currentRecId" description="This is the Record Id for displaying Hierarchy" type="String" required="true" assignTo="{!currentId}"/>
<apex:sectionHeader title="Account Hierarchy" subtitle="{!Business_Contract_to_Account__c.Name}"/>
<!--<c:HierarchyTreeDragAndDrop currentRecId="{!Account.id}" sObjectTypeName="Account" sObjectFieldsAPINames="Type,Industry" parentIdFieldAPI="parentId" numOfLevels="5"/>
---> "{!Business_Contract_to_Account__c.AccountId__c}"
<apex:pageBlock >
<c:HeirarchyJBTreeV2 currentRecId="{!Business_Contract_to_Account__c.Customer__c}" sObjectTypeName="Business_Contract_to_Account__c" sObjectFieldsAPINames="Customer__r.AccountNumber,Customer__r.SAP_Partner_Functions__c,Customer__r.Store_Number__c,Customer__r.State_City_Country__c,Customer__r.Customer_Reporting_Group__c,Customer__r.Customer_Facing_Parent_Type__c" parentIdFieldAPI="Customer_Facing_Parent__c" displayListSize="700" numOfLevels="5"/>
</apex:pageBlock>
</apex:page>
and the component line is
<apex:attribute name="currentRecId" description="This is the Record Id for displaying Hierarchy" type="String" required="true" assignTo="{!currentId}"/>
Please try this -
<c:HeirarchyJBTreeV2 currentRecId="{!Business_Contract_to_Account__r.Customer__c}" sObjectTypeName="Business_Contract_to_Account__c" sObjectFieldsAPINames="Customer__r.AccountNumber,Customer__r.SAP_Partner_Functions__c,Customer__r.Store_Number__c,Customer__r.State_City_Country__c,Customer__r.Customer_Reporting_Group__c,Customer__r.Customer_Facing_Parent_Type__c" parentIdFieldAPI="Customer_Facing_Parent__c" displayListSize="700" numOfLevels="5"/>