Hi community,
I have a couple of ItemTypes with a custom LifeCycle. Sometimes when users promote an item to change the "state", the Form will not be updated and will not show the updated data. In this case users always had to click the refresh button to see the updated state.
So the basic situation is something like this:
I discovered that the Form update mainly fails when the item was created via a custom client Method. AND: In addition it only fails if the target ItemType is versionable.
Here are some simple steps to reproduce the scenario. Let´s assume we have following code that we can directly execute from a client Method:
const newItem = aras.newItem("Manufacturer","add"); aras.uiShowItemEx(newItem, "tab view");
The code will add a new item and opens it in a new tab. User than can save the item and promote it to another state.
- If the ItemType is something like Manufacturer, Form update will work after item promotion.
- If the ItemType is versionable like Part or Document the Form update will NOT work.
I checked the context item that is used for promotion. I noticed that for versionable items the LifeCycle data is not included in the context item when we come from a custom Method.
When using promote, the context item should contain information about the used LifeCycle like this:
But the life cycle State information is missing when promoting a versionable item that was created by Method
I wonder if this is a bug in innovator or if I forgot something in my Method code. The update error does not occur for of items that were created via the regular "New item" button.
I assume the missing LifeCycle data causes the problems with the Form update. Does anyone know how to improve this one?
Thanks for any hint!
Angela