You need to sign in to do that
Don't have an account?
jeremyy
Inline editing not calling controller action methods
I'm trying out inline editing with something like this:
<apex:detail subject="{!account.Id}" relatedList="true" inlineEdit="true" relatedListHover="true" showChatter="true" title="true" />
I'm using a controller extension and I've overridden save() and quicksave(). When you perform an indline edit and then click save, neither of the overridden methods are being called. Is there any way to have a controller method called when saving after inline editing?
I am not sure, I need to check for this.
But still I would like to know can't you achieve your target trough the trigger ?
I would love to do a trigger, but I need to do a callout which is not allowed in triggers.
You can create a future and can define it @callout=true and then can hit this future method from the trigger .
No, I can't because I will hit the future limit too quickly, plus I'd like to keep this synchronous.
With apex:detail, it will call standard save, edit, cancel methods. May be instead of overwriting save functionality, you can create another custom button and call javascript or VF page.
Are you sure? I'm throwing exceptions in both save() and quicksave() but saving after an inline edit works fine. Here's the log:
Cann't you use Apex Api's to save ?
I mean you can create a custom button can can add it on the detail page layout , onclick of this invoke salesforce api's to save the record.
The standard save button can't be hidden, so that's really not a viable solution. Also, when the user has done inline editing and clicks save, there is a lot of javascript/UI that has to happen, in addition to saving the record.
Are tied to apex:detail, or can you use anything else? Could you use Field Sets with Visualforce as an alternative?
In this case, no. The administrator must have the ability to make changes to buttons, related lists, etc., without requiring changes to VF markup.
It seems that saving after inline editing does not call a controller action method, and currently there's no way around this.
How did you end up resolving your requirement? I have the same issue where I want to run some controller code to override the save functionality. When inline editing is used it doesn't call my method - wondered what your workaround was.
Thanks for sharing.
I believe I ended up plugging into the javascript event that fires when the inline edit save finishes, and then calling an actionFunction. The javascript is all undocumented, and it's a hack, so beware and YMMV.