function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Santosh reddy 14Santosh 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}"/>
Alisha Mehta 9Alisha Mehta 9
Hi,

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"/>