I have a custom object with a custom field set. This is displayed on the visual force page shown below.

Problem is the data only shows up sometimes. enter image description here

The relationship looks like this

Account --> Orders --> item

Disbursements --> item

So one to many, one account can have many orders, one order can have many items and many disbursements each disbursement will have many items. The page is on the item itself and the goal is mass editing so they can update information on many items in one go.

The Entity itself is a Formula(Text) with format: Purchase_Order__r.Account__r.Name

The Purchase is a Lookup on the name which is unique as the items are related to the purchase directly this made sense to me. The Disbursements are the same as the Purchase and are sometimes not showing up as well!!! but it seems to be much less often.

Can anyone point me to why or give some ideas how to fix this. I had gone to the trouble of making custom controller using maps to find the data to handle just these, but so much other functionality breaks so I would like it inside the sales-force package if possible. We also want the hyperlink and the hover functionality to work etc.

However if I goto the item itself I can click all of them no problem. Also if I go into a related object the others are present no problem.

Edit: Here is the relevant code: Object:



 <apex:pageblocktable value="{!records}" var="item" id="recordsTable">
            <apex:repeat value="{!columnFields}" var="field">
                <apex:column headervalue="{!field.label}">
                    <apex:outputfield value="{!item['obj'][field.name]}" />                       


public class Records {  
    public sObject obj {get; set;}
    //Get all records
public List<Records> getRecords() 
    List<sObject> objects = ssc.getRecords();       
    List<Records> records = new List<Records>();
    for (sObject obj : objects) {
        Records record = new Records();
        record.obj = obj;
    return records;

public List<ColumnField> getColumnFields() {
    List<ColumnField> columnFields = new List<ColumnField>();               
    for (Schema.FieldSetMember field : getFields())
        ColumnField cField = new ColumnField();
        cField.name = field.getFieldPath();
        cField.label = field.getLabel();                        
    return columnFields;

Edit2: To answer the second question all of the fields are propogated when you goto the object itself. Your not looking at partially completed data its all there for every row: enter image description here

  • The only way to help you with this is if we have the APEX code and Visualforce code behind this. There is no randomness in the code so it must be an error in the code or in the data. Oct 14 '16 at 7:00
  • I can edit the post and add the code but this was done completely by the GUI in Salesforce with no modification of the controller or objects related to this in any way.
    – JPK
    Oct 14 '16 at 7:04
  • 1
    that would mean the data is like that. Can you post a copy of the detail page of e.g. disbursement request 000122? Are those fields filled there? I suppose they're not..? Oct 14 '16 at 7:07
  • They are filled out, Im editing the post 2 minutes
    – JPK
    Oct 14 '16 at 7:10
  • 1
    Thanks for adding! The screenshot at the top is from a search on the 'Item' object I suppose? So it looks like there are items which have a Disbursement Request, but no Order. So actually I was wrong, we shouldn't look into the Disbursement Request detail page but to the Item detail page (the item that looks up to Disbursement Request 000122, so it is probably in the 'Items' related list on that page) Oct 14 '16 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.