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
Merry SMerry S 

authorization Required error

I have created a site that I will use for internal employees who do not have salesforce. I have set this up but for whatever reason I cannot access any account info.

 

http://mastercontrol.force.com/anycethome/anyCustomerEmployeeTimeDetail?id=0013000000GfdxRAAR - this page throws the authentication error

http://mastercontrol.force.com/anycethome/anyCustomerEmployeeTimeDetail - this loads fine but with no data

 

I have set the permission for all of the objects. I feel like I have checked everything I know to check.. what am I doing wrong?!!

 

Let me know if you need more details.

 

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

I notice you have the 'with sharing' keywords in the controller.  That tells the controller to respect the sharing rules for the current user, which is a guest user with no role.  Thus unless you have the org wide default set to public read/write, the site guest user will only be able to see accounts that it owns, which is probably none.  

 

You won't be able see opportunities from a site guest user, as the license doesn't have access to that sobject type.

All Answers

bob_buzzardbob_buzzard

Authorization required often means that the platform is trying to send you to an error page, but that requires you to be logged into Salesforce to view it.

 

Have you tried previewing as admin?  That will show you any errors that would otherwise be swallowed.

Merry SMerry S

Yes, I have and all that is shows is that I need to stop viewing as admin. This works fine as a vf page when logged into SF, just in force.com sites that it does not. I have turned on debug logs for the site and before I get the Auth required pag the logs shows

 

CUMULATIVE_LIMIT_USAGE

 

I am not sure what it means. I have looked it up, but still confused. I have set all of the permissions to read/create for all standard objects and set every field to read only. I have set all custom objects to read and made all fields visible (all of this for troubleshooting - at first I just had what I thought I needed). I have enabled all apex classes and all vf pages.

 

The degug logs shows that everything succeeded. So, I am really at a loss here. Do I need to post the code?

 

 

 

 

CUMULATIVE_LIMIT_USAGE
Merry SMerry S

@bob_buzzard

 

Let me give some more information  - maybe I just don't understand how force.com sites work. Do you have to authenticate someone to let them see data from salesforce? It seems unlikely, as one page works just fine and shows me data. Here is the code for a page that does not work in force.com sites (guest users), but works perfectly otherwise. (For authenticated users). When users go to this page they should see a list of accounts. I have enabled the vf page and the controller for the guest user. As well as permissions to read accounts, and view all fields. The debug log shows no errors. It seems like a permission issue - but I just cannot imagine what I am missing. There is one other pge that does not work either, it references many more objects (related to account - opps, cases, contacts, etc. but I thought I would start with getting help with this page and hopefully learn something I can apply to the other.  Any help is appreciated. 

 

Controller:

public with sharing class AccountSearchController {

  // the soql without the order and limit
  private String soql {get;set;}
  // the collection of accounts to display
  public List<Account> accounts {get;set;}
 
  // the current sort direction. defaults to asc
  public String sortDir {
    get  { if (sortDir == null) {  sortDir = 'asc'; } return sortDir;  }
    set;
  }
 
  // the current field to sort by. defaults to account name	
  public String sortField {
    get  { if (sortField == null) {sortField = 'Name'; } return sortField;  }
    set;
  }
 
  // format the soql for display on the visualforce page
  public String debugSoql {
    get { return soql + ' order by ' + sortField + ' ' + sortDir + ' limit 100'; }
    set;
  }
 
  // init the controller and display some sample data when the page loads
  public AccountSearchController() {
    soql = 'select Name, Account_Management_Type__c, Territory_Vertical__c, Tier__c, Subsidiary__c,Overall_Status__c, Industry, Territory__c from Account where Account_Management_Type__c != null';
    runQuery();
  }
 
  // toggles the sorting of query from asc<-->desc
  public void toggleSort() {
    // simply toggle the direction
    sortDir = sortDir.equals('asc') ? 'desc' : 'asc';
    // run the query again
    runQuery();
  }
 
  // runs the actual query
  public void runQuery() {
 
    try {
      accounts = Database.query(soql + ' order by ' + sortField + ' ' + sortDir + ' limit 100');
    } catch (Exception e) {
      ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'Ooops!'));
    }
 
  }
 
  // runs the search with parameters passed via Javascript
  public PageReference runSearch() {
 
    String Name = Apexpages.currentPage().getParameters().get('Name');
    String accManage = Apexpages.currentPage().getParameters().get('accManage');
    String overall = Apexpages.currentPage().getParameters().get('overall');
    String Industry = Apexpages.currentPage().getParameters().get('Industry');
    String Vertical = Apexpages.currentPage().getParameters().get('Vertical');      
    String Tier = Apexpages.currentPage().getParameters().get('Tier');      
    String Sub = Apexpages.currentPage().getParameters().get('Sub');      
    String Territory = Apexpages.currentPage().getParameters().get('Territory');
 
      
 
    soql = 'select Name, Account_Management_Type__c, Overall_Status__c,  Territory_Vertical__c, Tier__c, Subsidiary__c, Industry, Territory__c from Account where Account_Management_Type__c != null';
    if (!Name.equals(''))
      soql += ' and Name LIKE \''+String.escapeSingleQuotes(Name)+'%\'';
    if (!accManage.equals(''))
      soql += ' and Account_Management_Type__c LIKE \''+accManage+'\'';
    if (!Industry.equals(''))
      soql += ' and Industry LIKE \''+Industry+'\'';
    if (!Vertical.equals(''))
      soql += ' and Territory_Vertical__c LIKE \''+Vertical+'\'';
    if (!Tier.equals(''))
      soql += ' and Tier__c LIKE \''+Tier+'\'';
    if (!Sub.equals(''))
      soql += ' and Subsidiary__c LIKE \''+Sub+'\'';      
    if (!Territory.equals(''))
      soql += ' and Territory__c LIKE \''+String.escapeSingleQuotes(Territory)+'%\'';
      
    // run the query again
    runQuery();
 
    return null;
  }
 
  // use apex describe to build the industry picklist values
  public List<String> Industry {
    get {
      if (Industry == null) {
 
        Industry = new List<String>();
        Schema.DescribeFieldResult field = Account.Industry.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
          Industry.add(f.getLabel());
 
      }
      return Industry;          
    }
    set;
  }
  // use apex describe to build the vertical picklist values
  public List<String> Vertical {
    get {
      if (Vertical == null) {
 
        Vertical = new List<String>();
        Schema.DescribeFieldResult field = Account.Territory_Vertical__c.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
          Vertical.add(f.getLabel());
 
      }
      return Vertical;          
    }
    set;
  }
    // use apex describe to build the tier picklist values
  public List<String> Tier {
    get {
      if (Tier == null) {
 
        Tier = new List<String>();
        Schema.DescribeFieldResult field = Account.Tier__c.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
          Tier.add(f.getLabel());
 
      }
      return Tier;          
    }
    set;
  }
     // use apex describe to build the subsidiary picklist values
  public List<String> Sub {
    get {
      if (Sub == null) {
 
        Sub = new List<String>();
        Schema.DescribeFieldResult field = Account.Subsidiary__c.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
          Sub.add(f.getLabel());
 
      }
      return Sub;          
    }
    set;
  }
    
      // use apex describe to build the Account Management picklist values
  public List<String> Accmanage {
    get {
      if (accmanage == null) {
 
        accmanage = new List<String>();
        Schema.DescribeFieldResult field = Account.Account_Management_Type__c.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
          accmanage.add(f.getLabel());
 
      }
      return accmanage;          
    }
    set;
  }
}

 Apex Page

<apex:page controller="AccountSearchController">
<apex:outputPanel>
    <style type="text/css">
    <!--
    body {
      color:#000000;
      background-color:#FFFFFF;
	    }
    a  { color:#0000FF; }
    a:visited { color:#800080; }
    a:hover { color:#008000; }
    a:active { color:#FF0000; }
    -->
	div#wrapperHeader div#header {
 width:1000px;
 height:200px;
 margin:0 auto;
}

div#wrapperHeader div#header img {
 width:; /* the width of the logo image */
 height:; /* the height of the logo image */
 margin:0 auto;
}
    </style>
  <apex:form >
  <apex:pageMessages id="errors" />
 
  <apex:pageBlock>
 
  <table width="100%" border="0">
  <tr>  
    <td width="200" valign="top">
 
      <apex:pageBlock title="Search"  id="criteria">
 
      <script type="text/javascript">
      function doSearch() {
        searchServer(
          document.getElementById("Name").value,
          document.getElementById("accManage").options[document.getElementById("accManage").selectedIndex].value,
          '',           
          document.getElementById("Industry").options[document.getElementById("Industry").selectedIndex].value,
          document.getElementById("Vertical").options[document.getElementById("Vertical").selectedIndex].value,
          document.getElementById("Tier").options[document.getElementById("Tier").selectedIndex].value,
          document.getElementById("Sub").options[document.getElementById("Sub").selectedIndex].value,  
          document.getElementById("Territory").value);
      }
      </script> 
 
      <apex:actionFunction name="searchServer" action="{!runSearch}" rerender="results,debug,errors">
          <apex:param name="Name" value="" />
          <apex:param name="accManage" value="" />
          <apex:param name="Overall" value="" />          
          <apex:param name="Industry" value="" />
          <apex:param name="Vertical" value="" />
          <apex:param name="Tier" value="" />
          <apex:param name="Sub" value="" />
          <apex:param name="Territory" value="" />
      </apex:actionFunction>
 
      <table cellpadding="1" cellspacing="1">
      <tr>
        <td style="font-weight:bold;">Account Name<br/>
        <input type="text" id="Name" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Account Management Type<br/>
          <select id="accManage" onchange="doSearch();">
            <option value=""></option>
            <apex:repeat value="{!Accmanage}" var="Accm">
              <option value="{!Accm}">{!Accm}</option>
            </apex:repeat>
          </select>
        </td>
      </tr>

      <tr>
        <td style="font-weight:bold;">Industry<br/>
          <select id="Industry" onchange="doSearch();">
            <option value=""></option>
            <apex:repeat value="{!Industry}" var="Ind">
              <option value="{!Ind}">{!Ind}</option>
            </apex:repeat>
          </select>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Vertical<br/>
          <select id="Vertical" onchange="doSearch();">
            <option value=""></option>
            <apex:repeat value="{!Vertical}" var="Ver">
              <option value="{!Ver}">{!Ver}</option>
            </apex:repeat>
          </select>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Tier<br/>
          <select id="Tier" onchange="doSearch();">
            <option value=""></option>
            <apex:repeat value="{!Tier}" var="Tier">
              <option value="{!Tier}">{!Tier}</option>
            </apex:repeat>
          </select>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Subsidiary<br/>
          <select id="Sub" onchange="doSearch();">
            <option value=""></option>
            <apex:repeat value="{!Sub}" var="Subs">
              <option value="{!Subs}">{!Subs}</option>
            </apex:repeat>
          </select>
        </td>
      </tr>          
          <tr>
        <td style="font-weight:bold;">Territory<br/>
        <input type="text" id="Territory" onchange="doSearch();"/>
        </td>
      </tr>          
      </table>
 
      </apex:pageBlock>
 
    </td>
    <td valign="top">
 
    <apex:pageBlock mode="edit" id="results">
 
        <apex:pageBlockTable value="{!accounts}" var="account">
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Account Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Name" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputLink value="/SitesDetail?id={!account.Id}" >
                <apex:outputField value="{!account.Name}"/>
                </apex:outputLink>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Account Management Type" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="accManage" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!account.Account_Management_Type__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Overall Status" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Overall" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!account.Overall_Status__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Industry" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Industry" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!account.Industry}"/>
            </apex:column>

                        <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Vertical" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Vertical" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!account.Territory_Vertical__c}"/>
            </apex:column>
            
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Tier" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Tier" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!account.Tier__c}"/>
            </apex:column>

            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Subsidiary" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Sub" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!account.Subsidiary__c}"/>
            </apex:column>
            
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Territory" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Territory" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!account.Territory__c}"/>
            </apex:column>            
        </apex:pageBlockTable>
 
    </apex:pageBlock>
 
    </td>
  </tr>
  </table>
 

 
  </apex:pageBlock>
 
  </apex:form>
 </apex:outputPanel>
</apex:page>

 

bob_buzzardbob_buzzard

I notice you have the 'with sharing' keywords in the controller.  That tells the controller to respect the sharing rules for the current user, which is a guest user with no role.  Thus unless you have the org wide default set to public read/write, the site guest user will only be able to see accounts that it owns, which is probably none.  

 

You won't be able see opportunities from a site guest user, as the license doesn't have access to that sobject type.

This was selected as the best answer
Merry SMerry S

Bob,

 

Thanks for that. Something so easy that I missed over and over again. Can you take a look at the page for the one I am getting the authorization required error? I tried removing the opportunities section but I was still getting the error. I added it back in for the purposes of showing what it looked like. TIA

 

 

 

 

VF

<apex:page tabstyle="Account" standardController="Account" >
<style type="text/css">
#rowInfo,#rows{
        padding:5px;
    text-align:center;
    background-color:#FFFFFF;
    border:solid 1px #c3c3c3;
}
#rowInfo { 
    width:50px;
    display:bold; 
}
table
{
border-collapse:collapse;
table-layout: fixed;
}	
 </style>
    <style type="text/css">
    <!--
    body {
      color:#000000;
      background-color:#FFFFFF;
	    }
    a  { color:#0000FF; }
    a:visited { color:#800080; }
    a:hover { color:#008000; }
    a:active { color:#FF0000; }
    -->
	div#wrapperHeader div#header {
 width:1000px;
 height:200px;
 margin:0 auto;
}

div#wrapperHeader div#header img {
 width:; /* the width of the logo image */
 height:; /* the height of the logo image */
 margin:0 auto;
}
    </style>
	<div id="wrapperHeader">
 <div id="header">
  <img src="https://c.na13.content.force.com/servlet/servlet.ImageServer?id=015a0000002WenZ&oid=00D3000000003Hx&lastMod=1375828250000" alt="logo" />
 
    <center><a href="javascript&colon;history.back()">Back</a></center>
        </div> 
</div>
    
    
    <apex:form >
    <apex:pageblock >     
        <apex:pageblocktable styleclass="list" value="{!Account}"  var="accdet">    
            <apex:column headervalue="Overall Status">
                    <apex:outputtext value="{!accdet.Overall_Status__c}" escape="false"/>
            </apex:column>
            <apex:column headervalue="Account Mgmt Type"> <img src="/s.gif" alt="" class="helpOrb" title="There are seven management types of accounts. These are exclusive—meaning that every Customer account in our database must be assigned to one, and only one, of these management types"/>
                    <apex:outputtext value="{!accdet.Account_Management_Type__c}"/>        
                </apex:column>  
            <apex:column headervalue="Account Name">
                    <apex:outputLink value="/{!accdet.Id}">{!accdet.Name}</apex:outputLink>
            </apex:column>            
            <apex:column headervalue="Opp/Order Status"> <img src="/s.gif" alt="" class="helpOrb" 
                title="Opportunity over 50k and at Stage 1 or higher."/>
                    <apex:outputtext value="{!accdet.Opportunity_Order_Status__c}" escape="false"/>
            </apex:column>
            <apex:column headervalue="Reference Status"> <img src="/s.gif" alt="" class="helpOrb" 
                title="Green - Median of all CSI score from contacts at account ≥ 9  - OR - Override reference status. Yellow - Median of all CSI score from contacts at account 7-9. Red - Median of all CSI score from contacts at account < 7."/>
                    <apex:outputtext value="{!accdet.NPS_Status__c}" escape="false"/>
            </apex:column>
            <apex:column headervalue="Case Status"><img src="/s.gif" alt="" class="helpOrb" 
                title="Green - No open P1 cases - AND - no open P2 cases - AND - no open P3 cases  older than 1 month. Yellow - No open P1 cases - AND - no open P2 cases older than 1 week - AND - no open P3 cases older than 3 months. Red - Any open P1 case - OR - Any open P2 cases older than 1 week - OR - Any open P3 cases older than 3 months."/>
                <apex:outputtext value="{!accdet.Case_Status_Stoplight__c}" escape="false"/>  
            </apex:column>
            <apex:column headervalue="MSA Status">  <img src="/s.gif" alt="" class="helpOrb" 
                title="Green - MSA paid and not expired. Yellow - MSA paid and expiring within 6 weeks. Red - MSA Expired."/>
                    <apex:outputtext value="{!accdet.MSA_Status__c}" escape="false"/>
            </apex:column>
                        <apex:column headervalue="Version Status">   <img src="/s.gif" alt="" class="helpOrb" 
                title="Green - All installed modules at all sites within 1 major release. Yellow - One or more installed modules across all sites more than 1 major release behind. Red - One or more installed modules across all sites more than 3 major release behind."/>
                    <apex:outputtext value="{!accdet.Version_Status__c}" escape="false"/>
            </apex:column>
                        <apex:column headervalue="Project Status">   <img src="/s.gif" alt="" class="helpOrb" 
                title="Green - No issues are affecting the project; project is on schedule. Yellow - Issues have been identified which MAY impact schedule and/or CSI - AND - Risk mitigation plan is in place. Red - Issues have been identified which ARE impacting schedule and/or CSI - OR - Risk mitigation plan NOT in place."/>
                    <apex:outputtext value="{!accdet.Risk_Status__c}" escape="false"/>
            </apex:column>
                        <apex:column headervalue="Team Status">   <img src="/s.gif" alt="" class="helpOrb" 
                title="Green - All applicable account team members assigned - AND - All team members engaged. Yellow - All applicable account team members assigned - AND - One or more team roles unengaged. Red - One or more account team members unassigned."/>
                    <apex:outputtext value="{!accdet.Team_Management_Status__c}" escape="false"/>
            </apex:column>
                        <apex:column headervalue="Escalation Status">   <img src="/s.gif" alt="" class="helpOrb" 
                title="Green - Account has not been Escalated. Red - Account has been escalated - see 'Escalated  Comments' for reason."/>
                    <apex:outputtext value="{!accdet.Escalate_Button__c}" escape="false"/>
            </apex:column>

        </apex:pageblocktable>
      <apex:pageblocktable styleclass="list" value="{!Account}"  var="acc">
                         <apex:column headervalue="Escalation Reason">   <img src="/s.gif" alt="" class="helpOrb" 
                title="Reason for Escalation"/>
                    <apex:outputtext value="{!acc.Escalated_Reason__c}" />
            </apex:column>   
     
        </apex:pageblocktable>
    </apex:pageblock>
           <apex:pageblock id="acId" title="Account Team"> 
                      <apex:pageblocksection columns="2" id="ka"   
 				rendered="{!Account.Account_Management_Type__c == 'Key (WIG)'}">
            <apex:repeat value="{!$ObjectType.Account.FieldSets.Key_Account_Team}" var="k">  
                <apex:outputfield value="{!Account[k]}">
                   
            </apex:outputfield></apex:repeat> 
        </apex:pageblocksection> 
                      <apex:pageblocksection columns="2" id="ap"   
 				rendered="{!Account.Account_Management_Type__c == 'Active Project'}">
            <apex:repeat value="{!$ObjectType.Account.FieldSets.Active_Project}" var="f">  
                <apex:outputfield value="{!Account[f]}">  
            </apex:outputfield></apex:repeat> 
        </apex:pageblocksection>  
                      <apex:pageblocksection columns="2" id="ao"   
 				rendered="{!Account.Account_Management_Type__c == 'Active Opportunity > $50K'}">
            <apex:repeat value="{!$ObjectType.Account.FieldSets.Active_Opp_TAM_Mng}" var="o">  
                <apex:outputfield value="{!Account[o]}">  
            </apex:outputfield></apex:repeat> 
        </apex:pageblocksection>  
                      <apex:pageblocksection columns="2" id="pm"   
 				rendered="{!Account.Account_Management_Type__c == 'Partner-Managed'}">
            <apex:repeat value="{!$ObjectType.Account.FieldSets.Partner_Mng}" var="p">  
                <apex:outputfield value="{!Account[p]}">  
            </apex:outputfield></apex:repeat> 
        </apex:pageblocksection>  
                      <apex:pageblocksection columns="2" id="tm"   
 				rendered="{!Account.Account_Management_Type__c == 'TAM-Managed'}">
            <apex:repeat value="{!$ObjectType.Account.FieldSets.Active_Opp_TAM_Mng}" var="t">  
                <apex:outputfield value="{!Account[t]}">  
            </apex:outputfield></apex:repeat> 
        </apex:pageblocksection>  
                      <apex:pageblocksection columns="1" id="tse"   
 				rendered="{!Account.Account_Management_Type__c == 'TSE-Managed'}">
  					<apex:outputText > No Account Managers for TSE-Managed Accounts</apex:outputText>
        </apex:pageblocksection>
                      <apex:pageblocksection columns="1" id="in"   
 				rendered="{!Account.Account_Management_Type__c == 'Inactive'}">
  					<apex:outputText > No Account Managers for Inactive Accounts</apex:outputText>
        </apex:pageblocksection>
                      <apex:pageblocksection columns="1" id="none"   
 				rendered="{!Account.Account_Management_Type__c == ''}">
  					<apex:outputText > No Account Managers listed as Account Management Type is blank!</apex:outputText>
        </apex:pageblocksection>
                                 
    </apex:pageblock> 

        
        
        <apex:pageblock id="vrId" title="MSA and Version Information">  
        <apex:pageblocksection columns="2" id="vrsIs">  

            <apex:repeat value="{!$ObjectType.Account.FieldSets.MSA_Status}" var="m">  
                <apex:outputfield value="{!Account[m]}">  
            </apex:outputfield></apex:repeat> 
        </apex:pageblocksection>  
    </apex:pageblock>  


    </apex:form> 
  <table width="100%">

      <tr>
<td>          
<apex:sectionHeader title="Opportunities" />
<apex:pageBlock > 
<apex:pageBlockTable value="{!Account.Opportunities}" var="child">
    <apex:column headervalue="Name"><apex:outputLink value="/{!child.id}">{!child.name}</apex:outputLink></apex:column>
    <apex:column value="{!child.Name}"/>
    <apex:column value="{!child.stagename}"/>
    <apex:column value="{!child.amount}"/>
    <apex:column value="{!child.closedate}"/>
    <apex:column value="{!child.ownerid}"/>
    <apex:column value="{!child.Opportunity_Order_Status__c}"/>   
</apex:pageBlockTable> 
</apex:pageBlock>
          </td>
      </tr>
      <tr>
<td>  
<apex:sectionHeader title="Ratings" />
<apex:pageBlock > 
<apex:pageBlockTable value="{!Account.Product_Ratings__r}" var="child">
    <apex:column headervalue="Name"><apex:outputLink value="/{!child.id}">{!child.name}</apex:outputLink></apex:column>
    <apex:column value="{!child.Contact__c}"/>
    <apex:column value="{!child.Date__c}"/>
    <apex:column value="{!child.Rating_Type__c}"/>
    <apex:column value="{!child.Rating__c}"/>
    <apex:column value="{!child.Comments__c}"/>
   
</apex:pageBlockTable> 
</apex:pageBlock>
          </td>
      </tr>
         <tr>
<td>  
<apex:sectionHeader title="Cases" />
<apex:pageBlock > 
<apex:pageBlockTable value="{!Account.Cases}" var="child">
    <apex:column headervalue="Name"><apex:outputLink value="/{!child.id}">{!child.CaseNumber}</apex:outputLink></apex:column>
    <apex:column value="{!child.CreatedDate}"/>
    <apex:column value="{!child.Contact}"/>
    <apex:column value="{!child.Priority}" />
    <apex:column value="{!child.Status}"/>
    <apex:column value="{!child.Case_Status__c}"/>
   
</apex:pageBlockTable> 
</apex:pageBlock>

             </td>
      </tr>
      <tr>
<td>  

<apex:sectionHeader title="Projects" />
<apex:pageBlock > 
<apex:pageBlockTable value="{!Account.Risk_Statuses__r}" var="child">
    <apex:column headervalue="Name"><apex:outputLink value="/{!child.id}">{!child.name}</apex:outputLink></apex:column>
    <apex:column value="{!child.Project_Name__c}"/>
    <apex:column value="{!child.Project_Stage__c}"/>
    <apex:column value="{!child.Project_Scheduled_project_start_date__c}" headervalue="Start Date"/>
    <apex:column value="{!child.Project_Calculated_project_finish_date__c}" headervalue="Finish Date"/>
    <apex:column value="{!child.Project_Risk_Status__c}"/>
   
</apex:pageBlockTable> 
</apex:pageBlock>
          </td>
      </tr>

    </table>
          </apex:page>

 

bob_buzzardbob_buzzard

So much depends on your configuration I'm afraid.  The way I usually handle these is to comment out all of the markup and then gradually re-introduce sections and see where it breaks.

Merry SMerry S

I was able to get this resolved. I ended up creating a public group and then editing the sharing rules. Bob, thanks for helping me, you are a huge asset for SF developers, especially those, like me, who are learning as we go.

Raj 6Raj 6
Hi LessDfined,

Could you explain me clearly what is the resolution you did,I've the same problem suffering.So after crating public group,what we have to do?

Thanks
Rajkumar