pricerc wrote:But assuming we want to auto-save, say every time a new line is added to a quote, I can trap LineAdded, LineChanged, LineRemoved OK, but is there anything I need to watch out for? Like calling save messing with the focus on the form?
I have no doubt there will be some niggling issues you'll need to work around. Without actually doing what you're describing myself, I can't really tell you specifically, but preserving the field / cell which previously had the focus before the auto-save is one potential issue.
The other is calling the business logic save method triggers a read, and if the save was called whilst something was in the middle of doing something (perhaps another plugin, perhaps our code logic) then once control is returned the business logic will may be in an unexpected state.
To be a little more specific - and this doesn't apply to your use case, but to just illustrate potential issues - calling the Save method of the business logic whilst handling the OnAdded event of the quote line collection will cause issues especially when adding kits. This is why we have the AddInventoryItemEnd event - this is called at the very end of adding an item to the quote.
So - don't invoke save within a handler for OnAdded - use the AddInventoryItemEnd event instead. Any other issues as they emerge just bring it up here and we'll try to work out how to deal with it.
Mike