Hi, everyone.
I'm trying to add a command button to a detailtab and use this button to update item (write some complex properties to the item, etc.) when in the Item Edit window. I used the UpdateItem Method, but this method will create a new item version and the Item Edit window will not be aware of this new version, so when I click "Save and Close", the new version will be discarded and all the change I made will lost. And It is worse when I close the Item Edit window without click "Save and Close", intending to abandon the change, the Item Edit window will not undo that new version, the change i made will be saved! Things are turned upside down here.
So, do this means that it is impossible to change the item with my own code in the item edit window? or it has been designed like this?
It's confusing that a custom detailtab being also available in the item edit window, make me think that we can integrate our own command into the item edit window to change something, please let me know if it is just my misunderstanding.
It's probably not a good idea to perform edit operations within the edit dialog. I recommend disabling your edit button if you detect that you are in the edit window.
I agree that it's strange to have a custom tab in the Item Edit window. However, if the custom tab is read-only, it may provide useful information. Since the API framework can't distinguish between read-only and read-write tabs, it displays all tabs.
I'll log this as a defect for now. In the meantime, the best workaround is to disable the edit capability when in the edit dialog.