Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Edit Item with my own code in the Item Edit Window

1 REPLY 1
Reply
Message 1 of 2
smilinger
337 Views, 1 Reply

Edit Item with my own code in the Item Edit Window

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.

1 REPLY 1
Message 2 of 2
Redmond.D
in reply to: smilinger

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.



Doug Redmond
Software Engineer
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report