Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I have a Visualforce page which displays Account Id and User First Name with "inlineEditSupport"

Visulaforce Page :

 <apex:dataList value="{!resobj}" var="a">
  <apex:inLineEditSupport event="ondblclick" showOnEdit="Update"/>
      <apex:outputField id="OrgId" value="{!a.BAccounts.Id}"/>
      <apex:outputField id="name" value="{!a.usr.FirstName}"/>
  </apex:dataList>
  <apex:commandButton value="GetData" id="submit" action="{!getdata}"/>

After get the result iam able to edit firstname but not able to edit Account Id. why I am not able to edit Id in the VisualForce Page?

share|improve this question

2 Answers 2

Account ID is always a read only field. You cannot edit it. If you want to change the account Id you have to load the page again with that particular Account.

share|improve this answer

The editability will depend on the type of the relationship.

If it is "Master-Detail Relationship" without "Allow reparenting" the field will not be editable because the objects are tightly tied together in terms of things like ownership and cascading deletes.

But if it is "Lookup Relationship" (or "Master-Detail Relationship" with "Allow reparenting") it should be editable.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.