• venkatesh_d041.3888386112928691E12
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 3
    Likes Given
  • 10
    Questions
  • 7
    Replies
Hello all,

I'm trying to utilize a piece of AppShare for hierarchy presentation which drops down and closes when clicked, found here:http://appexchange.salesforce.com/listingDetail?listingId=a0N300000016chCEAQ (Inline Account Hierarchy)

 However, my company modified the code a bit to be a bit more universal in terms of our client, but for some reason, expand and collapse features don't work.

Please let me know if anyone has faced same issue.

Thanks a lot
Vennkat
Hi All ,

Need to build salesforce role like hierarchy for custom object with dynamic add and delete for all the values.
Please let mek now if anyone has worked or have idea abt it.

thanks a lot

Best Regards
Venkat
hi all,

have a vf need to renderAs pdf, the issue here is all my content is displayed through javascript.
renderAs pdf is not supporting javascript. let me know any possible way to overcome this issue..

thanks in advance
venkat
How can I host a video on Salesforce.com?
We are developing a mobile application which will get data from Salesforce Enterprise Edition. When user wants to view any data in mobile, the webservices call would be made from mobile to salesforce for fetching the Data. We would like to know what is the limits for API calls made from mobile to Salesforce on a per day basis. Whether API Usage limit in System Overview available in our Salesforce instance combines both the webservices calls out and in from salesforce? .Please provide us the information ASAP.

Thanks
I have Overridden case edit page with custom VF page, now i need to add the standard check spelling button or custon check spelling button to the edit page.
Please guide me if any have ideas

Thnaks
Venkat.
This is an older problem  but got no further than promoting the Salesforce Idea: SOAPFault Information for Apex. It came up again today with users of a managed package wanting better error messages when a web service callout fails.

When this gets handled by Apex it gets turned into a CalloutException:

    System.CalloutException
    Cause: null
    Message: Web service callout failed: WebService returned a SOAP Fault: The creator of this fault did not specify a Reason. faultcode=s:Client faultactor=

The issue I have is that the getMessage() method doesn't return the entire SOAP reponse. It has been truncated before the useful information appears.

Is there some way to recover the entire response from the CalloutException in code so I can give a meaning error back to the user?


Thanks,
Venkat.
I have a custom button which I've placed on a standard layout.

It has javacript in it that calls an Apex class.

But the Apex class can take up to 50 seconds to process, and during that time, I'd like to display an hourglass or 'please wait' message.

please let me know how to achive this.
the label of the tab tab is still new case, where the case number should be populated. I have overriden the new button with custom VF. previouly it was working only after overriding with custom VF its not working. Help needed asap.
Thanks in advance
Failed to convert property value of type [org.apache.commons.collections.map.LinkedMap] to required type [java.util.HashMap] for property 'sqlParams'] Error In Command line data loader. when running from unix.

Urgent help needed.Any help will be highly appreciate able


Thanks in advance.
How can I host a video on Salesforce.com?
Failed to convert property value of type [org.apache.commons.collections.map.LinkedMap] to required type [java.util.HashMap] for property 'sqlParams'] Error In Command line data loader. when running from unix.

Urgent help needed.Any help will be highly appreciate able


Thanks in advance.
Hi All ,

Need to build salesforce role like hierarchy for custom object with dynamic add and delete for all the values.
Please let mek now if anyone has worked or have idea abt it.

thanks a lot

Best Regards
Venkat
How can I host a video on Salesforce.com?
I have Overridden case edit page with custom VF page, now i need to add the standard check spelling button or custon check spelling button to the edit page.
Please guide me if any have ideas

Thnaks
Venkat.

Hi,

       how to create check spelling button on visualforce page standard controller.

is it possible?

 

 

thank you

I want to populate treeview same as Organization's Role Hierarchy in salesforce. Add/Edit features should be threre. But this tree view should not reflect the Organization's Role Hierarchy.

 

Example:

 

Admin1
|------ Manager1
--|------ ReportingPerson1
--|------ ReportingPerson2
|------ Manager2
--|------ ReportingPerson3
--|------ ReportingPerson4
--|------ ReportingPerson5
|------ Manager3
--|------ ReportingPerson1
--|------ ReportingPerson6
--|------ ReportingPerson7
--|------ ReportingPerson8
|------ Manager4
--|------ ReportingPerson2
Admin2
|------ Manager5
--|------ ReportingPerson1
--|------ ReportingPerson2
|------ Manager6
--|------ ReportingPerson3
--|------ ReportingPerson4
--|------ ReportingPerson5

 

--Chamil Madusanka

Hello, I'm trying to utilize a piece of AppShare for hierarchy presentation which drops down and closes when clicked, found here: http://appexchange.salesforce.com/listingDetail?listingId=a0N300000016chCEAQ

 

However, my company modified the code a bit to be a bit more universal in terms of our client, but for some reason, the drop down and closing features don't work.

 

Here is the VF code we used:

 

 

<apex:component Controller="AccountStructure" >
    <apex:attribute name="currentId" description="This is the Account Id for displaying Acccount Hierarchy" type="String" required="true" assignTo="{!currentId}"/>
  
  <div id="account-hierarchy">
  <table style="width: 100%">
   <tr>
    
    <td valign="top"  width="33%">  
    <apex:repeat value="{!ObjectStructures}" var="ObjectStructur" >  
    <h3>{!ObjectStructur.title}</h3>
    <div class="treeNode">  
       <apex:repeat value="{!ObjectStructur.asms}" var="pos" >
            <apex:repeat value="{!pos.levelFlag}" var="flag" first="0">
                <apex:image url="/img/tree/empty.gif" height="16" width="20" rendered="{!IF(flag,false,true)}"/>
                <apex:image url="/s.gif" alt="" width="3" height="16" rendered="{!IF(flag,true,false)}"/>
                <apex:image url="/img/tree/chain.gif" height="16" width="20" rendered="{!IF(flag,true,false)}"/>
            </apex:repeat>
            <span height="16" v="top">
           <apex:outputText rendered="{!IF(pos.nodeType=='start',true,false)}">
                <apex:image id="tree_start" url="/img/tree/minusStart.gif" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Icon_start" url="/img/icon/custom51_100/globe16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>
                <apex:image id="Icon_start_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='parent',pos.nodeType=='parent_end'),true,false)}">
                <apex:image id="Tree_parent" url="/img/tree/minus.gif" rendered="{!IF(pos.nodeType=='parent',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Tree_parent_end" url="/img/tree/minusEnd.gif" rendered="{!IF(pos.nodeType=='parent_end',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>                
                <apex:image id="Icon_parent" url="/img/icon/factory16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>
                <apex:image id="Icon_parent_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='child',pos.nodeType=='child_end'),true,false)}">
                <apex:image id="Tree_child" url="/img/tree/node.gif" rendered="{!IF(pos.nodeType=='child',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Tree_child_current" url="/img/tree/nodeEnd.gif" rendered="{!IF(pos.nodeType=='child_end',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Icon_child" url="/img/icon/desk16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>    
                <apex:image id="Icon_child_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
            <apex:outputText rendered="{!IF(pos.nodeType=='end',true,false)}">
                <apex:image id="Tree_end" url="/img/tree/nodeEnd.gif" height="16" width="20"/>
                <apex:image id="Icon_end" url="/img/icon/desk16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>
                <apex:image id="Icon_end_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
<!-- Change Below -->
            <apex:outputLink value="/{!pos.account.id}" style="{!IF(pos.currentNode,'font-weight: bold;','')}" styleClass="columnHeadActiveBlack" target="_top">{!pos.account.name}</apex:outputLink>

<!-- Include the following if you uses sites with accounts -->

            <apex:outputText style="{!IF(pos.currentNode,'font-weight: bold;','')}" value=", {!pos.account.Parent_Type__c}" rendered="{!IF(pos.account.Parent_Type__c != '', true, false)}"/>
            <apex:outputText style="{!IF(pos.currentNode,'font-weight: bold;','')}" value=", {!pos.account.Account_Sub_Type__c}" rendered="{!IF(pos.account.Account_Sub_Type__c != '', true, false)}"/>
            <apex:outputText style="{!IF(pos.currentNode,'font-weight: bold;','')}" value=", {!pos.account.Industry}" rendered="{!IF(pos.account.Industry!= '', true, false)}"/>&nbsp;
<!-- Stop -->
            </span>
            <div> </div>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='child_end',pos.nodeType=='child'),false,true)}">
                <div id='{!pos.nodeId}'></div>
            </apex:outputText>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='child_end',pos.nodeType=='child'),true,false)}">
                <div id='{!pos.nodeId}'><apex:image url="/s.gif" alt="" width="1" height="1"/></div>
            </apex:outputText>
            <apex:repeat value="{!pos.closeFlag}" var="close"></apex:repeat>    
   
            </apex:repeat>
        </div>   
    </apex:repeat> 
   </td>
   <td valign="top" width="33%">
   <div style="padding-bottom: 20px;">  
   <h1>Groups</h1>
   </div>
   <apex:repeat value="{!Groups}" var="group" >  
    <h3><a href="/{!group.Id}" target="_blank">{!group.Name}</a></h3>
    <div class="treeNode"> 
     <apex:outputPanel rendered="{!group.size>100}">This group has more than 100 accounts. Click on the group name to view all accounts.</apex:outputPanel>
     <apex:outputPanel rendered="{!group.size<=100}">
     <ul> 
     <apex:repeat value="{!group.accounts}" var="aw" >
      <li><apex:outputLink value="/{!aw.account.id}" style="{!IF(aw.isPrimary,'font-weight: bold;','')}" styleClass="columnHeadActiveBlack" target="_top">{!aw.account.name}</apex:outputLink></li>
     </apex:repeat>            
     </ul>
     </apex:outputPanel>
    </div>
    </apex:repeat>       
   </td>
   
   <td valign="top" width="33%">
   <div style="padding-bottom: 20px;">  
   <h1>Contracting Hierarchy</h1>
   </div>
   <apex:repeat value="{!Contracts}" var="contract" >  
    <h3><a href="/{!contract.Id}" target="_blank">{!contract.Name}</a></h3>
    <div class="treeNode"> 
     <apex:outputPanel rendered="{!contract.size>100}">This group has more than 100 accounts. Click on the group name to view all accounts.</apex:outputPanel>
     <apex:outputPanel rendered="{!contract.size<=100}">
     <ul> 
     <apex:repeat value="{!contract.accounts}" var="aw" >
      <li><apex:outputLink value="/{!aw.account.id}" style="{!IF(aw.isPrimary,'font-weight: bold;','')}" styleClass="columnHeadActiveBlack" target="_top">{!aw.account.name}</apex:outputLink></li>
     </apex:repeat>            
     </ul>
     </apex:outputPanel>
    </div>
    </apex:repeat>       
   </td>
   
  </tr>
 </table>
 </div>
</apex:component>

 

 

and here is the code used in the appshare

 

 

<!--
    Copyright (c)2008, Matthew Friend, Sales Engineering, Salesforce.com Inc.
    All rights reserved.

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 
    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    Neither the name of the�salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
    EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->

<!--
    Note on Changing: Scroll down or search for "Change"
    Ignore warnings
--> 

<apex:component Controller="AccountStructure">
    <apex:attribute name="currentId" description="This is the Account Id for displaying Acccount Hierarchy" type="String" required="true" assignTo="{!currentId}"/>

    <div class="treeNode">
            <apex:repeat value="{!ObjectStructure}" var="pos" >
            <apex:repeat value="{!pos.levelFlag}" var="flag" first="0">
                <apex:image url="/img/tree/empty.gif" height="16" width="20" rendered="{!IF(flag,false,true)}"/>
                <apex:image url="/s.gif" alt="" width="3" height="16" rendered="{!IF(flag,true,false)}"/>
                <apex:image url="/img/tree/chain.gif" height="16" width="20" rendered="{!IF(flag,true,false)}"/>
            </apex:repeat>

            <span height="16" v="top">

            <apex:outputText rendered="{!IF(pos.nodeType=='start',true,false)}">
                <apex:image id="tree_start" url="/img/tree/minusStart.gif" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Icon_start" url="/img/icon/custom51_100/globe16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>
                <apex:image id="Icon_start_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='parent',pos.nodeType=='parent_end'),true,false)}">
                <apex:image id="Tree_parent" url="/img/tree/minus.gif" rendered="{!IF(pos.nodeType=='parent',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Tree_parent_end" url="/img/tree/minusEnd.gif" rendered="{!IF(pos.nodeType=='parent_end',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>                
                <apex:image id="Icon_parent" url="/img/icon/factory16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>
                <apex:image id="Icon_parent_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='child',pos.nodeType=='child_end'),true,false)}">
                <apex:image id="Tree_child" url="/img/tree/node.gif" rendered="{!IF(pos.nodeType=='child',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Tree_child_current" url="/img/tree/nodeEnd.gif" rendered="{!IF(pos.nodeType=='child_end',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Icon_child" url="/img/icon/desk16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>    
                <apex:image id="Icon_child_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
            <apex:outputText rendered="{!IF(pos.nodeType=='end',true,false)}">
                <apex:image id="Tree_end" url="/img/tree/nodeEnd.gif" height="16" width="20"/>&nbsp;
                <apex:image id="Icon_end" url="/img/icon/desk16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>
                <apex:image id="Icon_end_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
<!-- Change Below -->
            <apex:outputLink value="/{!pos.account.id}" style="{!IF(pos.currentNode,'font-weight: bold;','')}" styleClass="columnHeadActiveBlack" target="_top">{!pos.account.name}</apex:outputLink>

<!-- Include the following if you uses sites with accounts -->

            <apex:outputText style="{!IF(pos.currentNode,'font-weight: bold;','')}" value=", {!pos.account.Type}" rendered="{!IF(pos.account.Type != '', true, false)}"/>
            <apex:outputText style="{!IF(pos.currentNode,'font-weight: bold;','')}" value=", {!pos.account.Industry}" rendered="{!IF(pos.account.Industry!= '', true, false)}"/>&nbsp;
<!-- Stop -->
            </span>
            <div> </div>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='child_end',pos.nodeType=='child'),false,true)}">
                <div id='{!pos.nodeId}'>
            </apex:outputText>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='child_end',pos.nodeType=='child'),true,false)}">
                <div id='{!pos.nodeId}'><apex:image url="/s.gif" alt="" width="1" height="1"/></div>
            </apex:outputText>
            <apex:repeat value="{!pos.closeFlag}" var="close">
                </div>
            </apex:repeat>            

    </apex:repeat>
    <br/><br/><br/>
    </div>
</apex:component>

 

Any help would be appreciated. Thanks

 

  • April 26, 2011
  • Like
  • 1

The free Inline Account Hierarchy App is very nice, and a good example of how to do clever stuff without nasty code, but when you collapse part of the hierarchy, it doesn't show with a + sign that their are hidden children.

 

Has anyone been able to add this functionality? 

Hello there,

 

Im having trouble on how to create a listener of salesforce outbound message. Do you have a step-by-step lesson on how to create a salesforce outbound listener ? specially in java and php language ? Please help me.

 

Kind Regards,

 

John

I want to populate treeview same as Organization's Role Hierarchy in salesforce. Add/Edit features should be threre. But this tree view should not reflect the Organization's Role Hierarchy.

 

Example:

 

Admin1
|------ Manager1
--|------ ReportingPerson1
--|------ ReportingPerson2
|------ Manager2
--|------ ReportingPerson3
--|------ ReportingPerson4
--|------ ReportingPerson5
|------ Manager3
--|------ ReportingPerson1
--|------ ReportingPerson6
--|------ ReportingPerson7
--|------ ReportingPerson8
|------ Manager4
--|------ ReportingPerson2
Admin2
|------ Manager5
--|------ ReportingPerson1
--|------ ReportingPerson2
|------ Manager6
--|------ ReportingPerson3
--|------ ReportingPerson4
--|------ ReportingPerson5

 

--Chamil Madusanka

Hello, I'm trying to utilize a piece of AppShare for hierarchy presentation which drops down and closes when clicked, found here: http://appexchange.salesforce.com/listingDetail?listingId=a0N300000016chCEAQ

 

However, my company modified the code a bit to be a bit more universal in terms of our client, but for some reason, the drop down and closing features don't work.

 

Here is the VF code we used:

 

 

<apex:component Controller="AccountStructure" >
    <apex:attribute name="currentId" description="This is the Account Id for displaying Acccount Hierarchy" type="String" required="true" assignTo="{!currentId}"/>
  
  <div id="account-hierarchy">
  <table style="width: 100%">
   <tr>
    
    <td valign="top"  width="33%">  
    <apex:repeat value="{!ObjectStructures}" var="ObjectStructur" >  
    <h3>{!ObjectStructur.title}</h3>
    <div class="treeNode">  
       <apex:repeat value="{!ObjectStructur.asms}" var="pos" >
            <apex:repeat value="{!pos.levelFlag}" var="flag" first="0">
                <apex:image url="/img/tree/empty.gif" height="16" width="20" rendered="{!IF(flag,false,true)}"/>
                <apex:image url="/s.gif" alt="" width="3" height="16" rendered="{!IF(flag,true,false)}"/>
                <apex:image url="/img/tree/chain.gif" height="16" width="20" rendered="{!IF(flag,true,false)}"/>
            </apex:repeat>
            <span height="16" v="top">
           <apex:outputText rendered="{!IF(pos.nodeType=='start',true,false)}">
                <apex:image id="tree_start" url="/img/tree/minusStart.gif" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Icon_start" url="/img/icon/custom51_100/globe16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>
                <apex:image id="Icon_start_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='parent',pos.nodeType=='parent_end'),true,false)}">
                <apex:image id="Tree_parent" url="/img/tree/minus.gif" rendered="{!IF(pos.nodeType=='parent',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Tree_parent_end" url="/img/tree/minusEnd.gif" rendered="{!IF(pos.nodeType=='parent_end',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>                
                <apex:image id="Icon_parent" url="/img/icon/factory16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>
                <apex:image id="Icon_parent_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='child',pos.nodeType=='child_end'),true,false)}">
                <apex:image id="Tree_child" url="/img/tree/node.gif" rendered="{!IF(pos.nodeType=='child',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Tree_child_current" url="/img/tree/nodeEnd.gif" rendered="{!IF(pos.nodeType=='child_end',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Icon_child" url="/img/icon/desk16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>    
                <apex:image id="Icon_child_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
            <apex:outputText rendered="{!IF(pos.nodeType=='end',true,false)}">
                <apex:image id="Tree_end" url="/img/tree/nodeEnd.gif" height="16" width="20"/>
                <apex:image id="Icon_end" url="/img/icon/desk16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>
                <apex:image id="Icon_end_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
<!-- Change Below -->
            <apex:outputLink value="/{!pos.account.id}" style="{!IF(pos.currentNode,'font-weight: bold;','')}" styleClass="columnHeadActiveBlack" target="_top">{!pos.account.name}</apex:outputLink>

<!-- Include the following if you uses sites with accounts -->

            <apex:outputText style="{!IF(pos.currentNode,'font-weight: bold;','')}" value=", {!pos.account.Parent_Type__c}" rendered="{!IF(pos.account.Parent_Type__c != '', true, false)}"/>
            <apex:outputText style="{!IF(pos.currentNode,'font-weight: bold;','')}" value=", {!pos.account.Account_Sub_Type__c}" rendered="{!IF(pos.account.Account_Sub_Type__c != '', true, false)}"/>
            <apex:outputText style="{!IF(pos.currentNode,'font-weight: bold;','')}" value=", {!pos.account.Industry}" rendered="{!IF(pos.account.Industry!= '', true, false)}"/>&nbsp;
<!-- Stop -->
            </span>
            <div> </div>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='child_end',pos.nodeType=='child'),false,true)}">
                <div id='{!pos.nodeId}'></div>
            </apex:outputText>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='child_end',pos.nodeType=='child'),true,false)}">
                <div id='{!pos.nodeId}'><apex:image url="/s.gif" alt="" width="1" height="1"/></div>
            </apex:outputText>
            <apex:repeat value="{!pos.closeFlag}" var="close"></apex:repeat>    
   
            </apex:repeat>
        </div>   
    </apex:repeat> 
   </td>
   <td valign="top" width="33%">
   <div style="padding-bottom: 20px;">  
   <h1>Groups</h1>
   </div>
   <apex:repeat value="{!Groups}" var="group" >  
    <h3><a href="/{!group.Id}" target="_blank">{!group.Name}</a></h3>
    <div class="treeNode"> 
     <apex:outputPanel rendered="{!group.size>100}">This group has more than 100 accounts. Click on the group name to view all accounts.</apex:outputPanel>
     <apex:outputPanel rendered="{!group.size<=100}">
     <ul> 
     <apex:repeat value="{!group.accounts}" var="aw" >
      <li><apex:outputLink value="/{!aw.account.id}" style="{!IF(aw.isPrimary,'font-weight: bold;','')}" styleClass="columnHeadActiveBlack" target="_top">{!aw.account.name}</apex:outputLink></li>
     </apex:repeat>            
     </ul>
     </apex:outputPanel>
    </div>
    </apex:repeat>       
   </td>
   
   <td valign="top" width="33%">
   <div style="padding-bottom: 20px;">  
   <h1>Contracting Hierarchy</h1>
   </div>
   <apex:repeat value="{!Contracts}" var="contract" >  
    <h3><a href="/{!contract.Id}" target="_blank">{!contract.Name}</a></h3>
    <div class="treeNode"> 
     <apex:outputPanel rendered="{!contract.size>100}">This group has more than 100 accounts. Click on the group name to view all accounts.</apex:outputPanel>
     <apex:outputPanel rendered="{!contract.size<=100}">
     <ul> 
     <apex:repeat value="{!contract.accounts}" var="aw" >
      <li><apex:outputLink value="/{!aw.account.id}" style="{!IF(aw.isPrimary,'font-weight: bold;','')}" styleClass="columnHeadActiveBlack" target="_top">{!aw.account.name}</apex:outputLink></li>
     </apex:repeat>            
     </ul>
     </apex:outputPanel>
    </div>
    </apex:repeat>       
   </td>
   
  </tr>
 </table>
 </div>
</apex:component>

 

 

and here is the code used in the appshare

 

 

<!--
    Copyright (c)2008, Matthew Friend, Sales Engineering, Salesforce.com Inc.
    All rights reserved.

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 
    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    Neither the name of the�salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
    EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->

<!--
    Note on Changing: Scroll down or search for "Change"
    Ignore warnings
--> 

<apex:component Controller="AccountStructure">
    <apex:attribute name="currentId" description="This is the Account Id for displaying Acccount Hierarchy" type="String" required="true" assignTo="{!currentId}"/>

    <div class="treeNode">
            <apex:repeat value="{!ObjectStructure}" var="pos" >
            <apex:repeat value="{!pos.levelFlag}" var="flag" first="0">
                <apex:image url="/img/tree/empty.gif" height="16" width="20" rendered="{!IF(flag,false,true)}"/>
                <apex:image url="/s.gif" alt="" width="3" height="16" rendered="{!IF(flag,true,false)}"/>
                <apex:image url="/img/tree/chain.gif" height="16" width="20" rendered="{!IF(flag,true,false)}"/>
            </apex:repeat>

            <span height="16" v="top">

            <apex:outputText rendered="{!IF(pos.nodeType=='start',true,false)}">
                <apex:image id="tree_start" url="/img/tree/minusStart.gif" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Icon_start" url="/img/icon/custom51_100/globe16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>
                <apex:image id="Icon_start_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='parent',pos.nodeType=='parent_end'),true,false)}">
                <apex:image id="Tree_parent" url="/img/tree/minus.gif" rendered="{!IF(pos.nodeType=='parent',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Tree_parent_end" url="/img/tree/minusEnd.gif" rendered="{!IF(pos.nodeType=='parent_end',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>                
                <apex:image id="Icon_parent" url="/img/icon/factory16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>
                <apex:image id="Icon_parent_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='child',pos.nodeType=='child_end'),true,false)}">
                <apex:image id="Tree_child" url="/img/tree/node.gif" rendered="{!IF(pos.nodeType=='child',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Tree_child_current" url="/img/tree/nodeEnd.gif" rendered="{!IF(pos.nodeType=='child_end',true,false)}" height="16" width="20" title="Click to expand/collapse nested items." onClick="TreeNodeElement.prototype.toggle(this,'{!pos.nodeId}')"/>
                <apex:image id="Icon_child" url="/img/icon/desk16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>    
                <apex:image id="Icon_child_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
            <apex:outputText rendered="{!IF(pos.nodeType=='end',true,false)}">
                <apex:image id="Tree_end" url="/img/tree/nodeEnd.gif" height="16" width="20"/>&nbsp;
                <apex:image id="Icon_end" url="/img/icon/desk16.png" width="16" height="16" rendered="{!IF(pos.currentNode,false,true)}"/>
                <apex:image id="Icon_end_current" url="/img/icon/star16.png" width="16" height="16" rendered="{!IF(pos.currentNode,true,false)}"/>
            </apex:outputText>
<!-- Change Below -->
            <apex:outputLink value="/{!pos.account.id}" style="{!IF(pos.currentNode,'font-weight: bold;','')}" styleClass="columnHeadActiveBlack" target="_top">{!pos.account.name}</apex:outputLink>

<!-- Include the following if you uses sites with accounts -->

            <apex:outputText style="{!IF(pos.currentNode,'font-weight: bold;','')}" value=", {!pos.account.Type}" rendered="{!IF(pos.account.Type != '', true, false)}"/>
            <apex:outputText style="{!IF(pos.currentNode,'font-weight: bold;','')}" value=", {!pos.account.Industry}" rendered="{!IF(pos.account.Industry!= '', true, false)}"/>&nbsp;
<!-- Stop -->
            </span>
            <div> </div>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='child_end',pos.nodeType=='child'),false,true)}">
                <div id='{!pos.nodeId}'>
            </apex:outputText>
            <apex:outputText rendered="{!IF(OR(pos.nodeType=='child_end',pos.nodeType=='child'),true,false)}">
                <div id='{!pos.nodeId}'><apex:image url="/s.gif" alt="" width="1" height="1"/></div>
            </apex:outputText>
            <apex:repeat value="{!pos.closeFlag}" var="close">
                </div>
            </apex:repeat>            

    </apex:repeat>
    <br/><br/><br/>
    </div>
</apex:component>

 

Any help would be appreciated. Thanks

 

  • April 26, 2011
  • Like
  • 1