• Dilip Kr
  • NEWBIE
  • 20 Points
  • Member since 2014
  • infosys limited

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 5
    Questions
  • 3
    Replies
Hello all,
    Our company is new to sales force and I'm working on setting up multiple reports and dashboards.  I discovered that any user can access any of the folders I created.  Searching through Help pages and googleing the problem the solutions all say to select make the folder private, however I have no option to do so.  When I edit or create a folder the only options I have are the name of the folder and the unique name.  When I share the folder to only certain users the other users can still access the folders.
      Also I have checked the permissions for the standard users and they have very limited permissions.  The only way I could stop them from accessing the folders was disabling the run reports permission but then they would get insufficient privleges error when trying to access the Report or Dashboard tabs.
     Any solutions of why I don't have options to make folders private and why the sharing doesn't work properly would be helpful.
User-added image
Hi all,
please let me know,how to get all contacts of an account on click on count of contact as show above screenshort.
please let me know what i missing in below code

apex class...........

public with sharing class sampleCode {

public List<wrapper> wrapperList{get; set;}
public List<Contact> contactsInformation { get; set; }
public Id selectedCountOfContact { get; set; }


public sampleCode(){
         wrapperList=new List<Wrapper>();
         for(Account a:[select Name,(select id,name from contacts),(select id from opportunities)  from Account limit 5])
         {
           Wrapper w1=new Wrapper();
           w1.Name=a.Name;
           w1.Con=a.contacts.size();
              
           w1.Opp=a.opportunities.size();
           wrapperList.add(w1);
         }       
}

class Wrapper{
    public String Name{get; set;}
    public Integer Con{get; set;}
    public Integer Opp{get; set;}   
 }
 
public List<Account> getMyAccounts() {
return [SELECT Id, Name,Industry, AccountNumber FROM Account ORDER BY
LastModifiedDate DESC LIMIT 10];
}

public void accountClicked() {
contactsInformation = [SELECT FirstName, LastName FROM Contact
WHERE AccountID = :selectedCountOfContact];
  }
}


and page.........



<apex:page controller="sampleCode">

<apex:form >

<apex:outputPanel id="ContactDetail">

<apex:repeat value="{!contactsInformation}" var="contact">
<p>{! contact.FirstName & ' ' & contact.LastName}</p>
</apex:repeat>
</apex:outputPanel>

<apex:pageBlock >
     <apex:pageBlockTable value="{!wrapperList}" var="b" >
                         <apex:column value="{!b.Name}" headerValue="Account Name"/>
                   
                         <apex:column headerValue="Total Contacts">  
                             <apex:commandlink action="{!accountClicked}" rerender="ContactDetail">
                             <apex:outputText value="{! b.con}"/>
                             <!--  <apex:param name="id" value="{!b.id}" assignTo="{!selectedcountofcontact}"/>-->
                         </apex:commandLink>                             
                         </apex:column>
                         
                         <apex:column headerValue="Total Opportunities">
                             <apex:commandLink value="{!b.Opp}"/>
                         </apex:column>                     

    </apex:pageBlockTable>
</apex:pageBlock>
</apex:form>

</apex:page>