+ Start a Discussion
Scott0987Scott0987 

field not showing

I have a controller that creates a list and then the list is displayed in a pageblocktable.  For some reason one of the fields is not showing and I have no idea why.

here is the visualforce page:

<apex:pageblocktable value="{!LineItemList}" var="lil" border="0"  columnsWidth="60px, 200px, 200px" width="100%" >
<apex:column headerValue="Action">
<apex:commandButton value="X" />
</apex:column>
<apex:column headerValue="Serial #">
<apex:inputField value="{!lil.SerialNo__c}"/>
</apex:column>
<apex:column headerValue="Part #" >
<apex:inputField value="{!lil.Part_Number_2__c}"/>
</apex:column>
<apex:column headerValue="Ship To Address" >
<apex:inputField value="{!lil.Display_Address__c}"/>
</apex:column>
</apex:pageblocktable>

 Here is the controller:

public list<OrderLine__c> getLineItemList(){
	billA = [select Full_Address__c from Address__c where Account__c = :acct.id AND Default__c = true AND Type__c = 'Bill To'];
	shipA = [select Full_Address__c from Address__c where Account__c = :acct.id AND Default__c = true AND Type__c = 'Ship To'];    
	newLineItems = new list<OrderLine__c>();
	ol0 = new OrderLine__c();
	ol1 = new OrderLine__c();
	ol2 = new OrderLine__c();
	ol3 = new OrderLine__c();
	ol4 = new OrderLine__c();
	ol5 = new OrderLine__c();
	ol6 = new OrderLine__c();
	ol7 = new OrderLine__c();
	ol8 = new OrderLine__c();
	ol9 = new OrderLine__c();
	ol0.ShipToAddress__c = shipA.id;
	ol1.ShipToAddress__c = shipA.id;
	ol2.ShipToAddress__c = shipA.id;
	ol3.ShipToAddress__c = shipA.id;
	ol4.ShipToAddress__c = shipA.id;
	ol5.ShipToAddress__c = shipA.id;
	ol6.ShipToAddress__c = shipA.id;
	ol7.ShipToAddress__c = shipA.id;
	ol8.ShipToAddress__c = shipA.id;
	ol9.ShipToAddress__c = shipA.id;
	ol0.Display_Address__c = shipA.Full_Address__c;
	ol1.Display_Address__c = shipA.Full_Address__c;
	ol2.Display_Address__c = shipA.Full_Address__c;
	ol3.Display_Address__c = shipA.Full_Address__c;
	ol4.Display_Address__c = shipA.Full_Address__c;
	ol5.Display_Address__c = shipA.Full_Address__c;
	ol6.Display_Address__c = shipA.Full_Address__c;
	ol7.Display_Address__c = shipA.Full_Address__c;
	ol8.Display_Address__c = shipA.Full_Address__c;
	ol9.Display_Address__c = shipA.Full_Address__c;   
	newLineItems = new list<OrderLine__c>();
	newLineItems.add(ol0);
	newLineItems.add(ol1);
	newLineItems.add(ol2);
	newLineItems.add(ol3);
	newLineItems.add(ol4);
	newLineItems.add(ol5);
	newLineItems.add(ol6);
	newLineItems.add(ol7);
	newLineItems.add(ol8);
	newLineItems.add(ol9);
	system.debug('***** newLineItems *****'+newLineItems);
return newLineItems;
}

 Here is the debug log:

***** newLineItems *****(OrderLine__c:{Display_Address__c=877n 8888s, dunesburry, Footah, foolah, 98745, ShipToAddress__c=a0SV00000014BTgMAM}, OrderLine__c:{Display_Address__c=877n 8888s, dunesburry, Footah, foolah, 98745, ShipToAddress__c=a0SV00000014BTgMAM}, OrderLine__c:{Display_Address__c=877n 8888s, dunesburry, Footah, foolah, 98745, ShipToAddress__c=a0SV00000014BTgMAM}, OrderLine__c:{Display_Address__c=877n 8888s, dunesburry, Footah, foolah, 98745, ShipToAddress__c=a0SV00000014BTgMAM}, OrderLine__c:{Display_Address__c=877n 8888s, dunesburry, Footah, foolah, 98745, ShipToAddress__c=a0SV00000014BTgMAM}, OrderLine__c:{Display_Address__c=877n 8888s, dunesburry, Footah, foolah, 98745, ShipToAddress__c=a0SV00000014BTgMAM}, OrderLine__c:{Display_Address__c=877n 8888s, dunesburry, Footah, foolah, 98745, ShipToAddress__c=a0SV00000014BTgMAM}, OrderLine__c:{Display_Address__c=877n 8888s, dunesburry, Footah, foolah, 98745, ShipToAddress__c=a0SV00000014BTgMAM}, OrderLine__c:{Display_Address__c=877n 8888s, dunesburry, Footah, foolah, 98745, ShipToAddress__c=a0SV00000014BTgMAM}, OrderLine__c:{Display_Address__c=877n 8888s, dunesburry, Footah, foolah, 98745, ShipToAddress__c=a0SV00000014BTgMAM})

 the issue I have is that the Display_Address__c field does not display.  Any idea why?

Best Answer chosen by Admin (Salesforce Developers) 
sf_evolutionsf_evolution

 

Hi there-

 

When going to Orderline__c object and looking at the column via the "View accessibility" button, does it  shows that it's Editable (and not hidden) for the profile   you're seeing the problem under?

 

 

 

 

 

All Answers

sf_evolutionsf_evolution

 

Hi there-

 

When going to Orderline__c object and looking at the column via the "View accessibility" button, does it  shows that it's Editable (and not hidden) for the profile   you're seeing the problem under?

 

 

 

 

 

This was selected as the best answer
Scott0987Scott0987

!@%!@%!@  SLAM.   that is me banging my head against my desk.  Thank you so much for pointing out what I had overlooked.  Thanks for the help.