1

I am trying to make the "Quantity" field inline-editable

Here is my VF code:

<apex:page controller="CustomQuoteController" sidebar="false">
    <apex:form >
        <apex:pageBlock title="Quote Generator" id="quotegen">
            <apex:pageBlockTable id="qliList" value="{!qliList}" var="qliProd" columns="3">
                <apex:column >
                    <apex:facet name="header">Name</apex:facet>
                    {!products[qliProd.Product2Id].Name}
                </apex:column>
                <apex:column >
                    <apex:facet name="header">Quantity</apex:facet>
                    <apex:outputField value="{!qliProd.Quantity}">
                        <apex:inlineEditSupport event="ondblclick"/>
                    </apex:outputField>
                </apex:column>
                <apex:column >
                    <apex:facet name="header">Action</apex:facet>
                    <apex:commandButton action="{!delQLI}" rerender="qliList" value="Remove">
                        <apex:param name="qliID" value="{!qliProd.Id}"/>
                    </apex:commandButton>
                </apex:column>
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

The tag doesn't seem to be doing anything. When I double click on the field in the pageBlockTable, nothing happens. It cannot be edited.

10
  • did you check your browsers console? any errors there?
    – glls
    Nov 3, 2017 at 20:58
  • @glls yes, I checked the console. No errors.
    – ag415
    Nov 3, 2017 at 20:59
  • Note: I am using a custom controller class. I don't know if that has anything to do with it. Does inlineEditSupport only work on standard controllers or standard controller extension classes?
    – ag415
    Nov 3, 2017 at 21:03
  • I also tried adding mode="inlineEdit" to the apex:pageBlock, but that didn't work either
    – ag415
    Nov 3, 2017 at 21:05
  • 1

1 Answer 1

3

Update: OP did not enable inline edit in the user interface setting

Make sure "Enable Inline Editing" is checked in user interface.

Check if you have enabled Accessibility mode on the user record.

Inline edit and some other JS events may get messed up when Accessibility is turned on.

If it is not the accessibility mode check this doc to see what other factors can impact inline editing

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_inline_editing.htm

Inline editing isn’t available in:

Accessibility mode

Setup pages

Dashboards

Customer Portal

Descriptions for HTML solutions

enter image description here

9
  • I am pretty sure we are not using accessibility mode, but I don't know how to confirm this. Would you happen to know how I can check if this is enabled? I tried searching "accessibility" in the setup but didn't see an option for that
    – ag415
    Nov 3, 2017 at 21:16
  • Go to the user record and search for accessibility mode (classic only)
    – Rao
    Nov 3, 2017 at 21:18
  • I just checked the user record, it says accessibility mode is disabled
    – ag415
    Nov 3, 2017 at 21:18
  • I suspect the problem has to do with the field level security of the field. I am not sure why I am seeing two different "Quantity" fields under quote line items...
    – ag415
    Nov 3, 2017 at 21:19
  • did you or your peers rename the a standard field in quote line item to Quantity ?
    – Rao
    Nov 3, 2017 at 21:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .