I want to use a TOC view as alternative user interface for users to edit items of another ItemType.
In my current concept the properties shown in the TOC view are set on run time manually. I wonder if I can directly tie an existing Item to the TOC view, as this makes the Form easier to handle.
I don´t use ItemType Part, but I will use it to describe the use case. Let´s assume we have two ItemTypes:
1. ItemType Part with all items
2. ItemType PartManipulator that doesn´t contain any item. This ItemType is only used as carrier for the TOC View. The Form used for the TOC view is linked to ItemType Part and contains fields from this Itemtype.
When I now open the TOC View, of course the properties linked to Part do not show any content, cause we do not have any context item in TOC View.
Is it possible to add a context item with an onLoad or onClick Method? For example something like this:
// get item
var inn = new Innovator();
var context = inn.newItem("Part", "get");
context = context .apply();
// show item in TOC view
document.thisItem = context;
document.item = context;
The shown code basically works and loads the Part to the document context. But the fields in the TOC view will not show any properties from Parts. Would be happy about any ideas!