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
finalistfinalist 

Inputfield not displaying despite profile visibility to object, field in question

I have a VF component that displays a blank inputfield that, when populated, retrieves the associated custom object record and displays additional data from that record.

 

When viewing the object in a detail page, all records & fields are visible to a particular profile; when I login as that user type, the fields and values are displayed.  When the visualforce page containing the custom component is loaded, the Label appears as an outputLabel, in the same pageBlock /  table as the inputField in question, but the inputfield is not visible at all to this profile. 

 

In the controller I create an empty Code_Map__c object, and then when the user clicks the 'Retrieve Code' button the Serial Number is passed in and the code associated to the Serial Number is displayed in a separate section.

 

While logged in as the user, again, the Serial Number field is displayed w/o an issue.   Any thoughts as to why the apex:inputfield would not show up at all to some profiles?

 

	<apex:pageBlock title="Retrieve Code" id="RetrieveCode">
		<table width="80%">
			<tr>
				<td>
					<apex:outputLabel value="{!$ObjectType.Code_Map__c.Fields.Serial_Number__c.Label}" for="serialNumber" />
				</td>
				<td>
					<apex:inputField id="serialNumber" value="{!cm.Serial_Number__c}" required="true" />
				</td>
			</tr>
			<tr>
				<td>
					<apex:commandButton action="{!fetchCode}" id="fetchCode" value="Retrieve Code" />
				</td>
			</tr>
		</table>
	</apex:pageBlock>

 

Best Answer chosen by Admin (Salesforce Developers) 
finalistfinalist

Profile needed to have Create() on the object; write not sufficient.  It's great to have team members!! 

All Answers

S91084S91084

Have you checked the profile settings for the not logged in user (site profile)? Make sure that the field is added to the page layout assigned to the site user.

finalistfinalist

This is an internal profile, not a Sites profile.  Controller class is visible to all, FLS visibility to all, field label is visible on the page, field value is not.  To some, anyway -- naturally, can see it fine... 

finalistfinalist

Further details:  tech support profile has view all permissions to object, and can see everything from the standard UI.  Custom component controller has JavaScript to show/hide component, works fine across profiles.  Field label as outputfield appears, field value as inputfield is missing/effectively hidden to tech support.

 

Neither object visibility, FLS, sharing, class or component access appears to be the issue (but may be; run across anything similar?)

 

Really appreciate the assistance; let me know what you think!

 

Duncan

S91084S91084

have you checked if that profile has read-only access to that field ?

finalistfinalist

All profiles have write access.

finalistfinalist

Profile needed to have Create() on the object; write not sufficient.  It's great to have team members!! 

This was selected as the best answer