Forum Discussion

Jan's avatar
Jan
Ideator I
3 months ago
Solved

Navigate tab --> Workflow

In an item, when i click on Navigate option and click on workflow, then i get the error as following:
Error: Item Type with name Null was not found. 


This happens when new revision of an item is created.

Please provide solution to it.

  • Hi, I am sorry it could not help. For me what I have written above is what caused the issue. You may have a different issue then.

    You might need to investigate the error in browsers Developer Tools (F12). Usually it shows the error in console output or you can see the faulty request in Network tab. Then you would try to set breakpoints and analyze further. 

    Also you can try to contact Aras support.

8 Replies

  • Hi,

    had same error on one of our custom Itemtypes, which was versionable as well.

    Here is copy-paste of my issue description to Aras support:

    The reason for this bug are RelationshipTypes, that do not have “source_id” set, which is the case of the “Workflow” RelationshipType. 

    The source of the bug is the file “\Innovator\Client\Modules\metadata\itemType.ts”. There is a function “getItemType”, which causes the bug, because it does not handle “null” values (due to missing source_id).

    Looking at this function in Aras version 12 SP18, one can see that there was a null check, so this bug was introduced in newer Aras versions.

     Add the null check back:

    [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:351ac57f-dd67-45a0-96ba-23a908c03553:type=text&text=%09if%20%28%21criteriaValue%29%20%7B%0D%0A%09%09return%20null%3B%0D%0A%09%7D%0D%0A]

    Here is the full function, with the bugfix (lines 5-7).

    [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:30ab49f6-9bd3-45a8-9f5d-b32850957c12:type=typescript&text=export%20const%20getItemType%20%3D%20async%20%28%0D%0A%09criteriaValue%3A%20string%2C%0D%0A%09criteriaName%3A%20%27name%27%20%7C%20%27id%27%20%3D%20%27name%27%0D%0A%29%3A%20Promise%3CItemType%3E%20%3D%3E%20%7B%0D%0A%09if%20%28%21criteriaValue%29%20%7B%0D%0A%09%09return%20null%3B%0D%0A%09%7D%0D%0A%09let%20itemTypeId%20%3D%20criteriaValue%3B%0D%0A%09if%20%28criteriaName%20%3D%3D%3D%20%27name%27%29%20%7B%0D%0A%09%09itemTypeId%20%3D%20await%20aras.MetadataCacheJson.GetItemTypeId%28criteriaValue%29%3B%0D%0A%09%09if%20%28%21itemTypeId%29%20%7B%0D%0A%09%09%09throw%20new%20Error%28getErrorMessage%28criteriaValue%2C%20criteriaName%29%29%3B%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%0D%0A%09try%20%7B%0D%0A%09%09const%20result%20%3D%20await%20aras.MetadataCacheJson.GetItemType%28itemTypeId%2C%20%27id%27%29%3B%0D%0A%09%09return%20result%3B%0D%0A%09%7D%20catch%20%28error%29%20%7B%0D%0A%09%09throw%20new%20Error%28getErrorMessage%28itemTypeId%2C%20%27id%27%29%2C%20%7B%0D%0A%09%09%09cause%3A%20error%0D%0A%09%09%7D%29%3B%0D%0A%09%7D%0D%0A%7D%3B%0D%0A]

    • Jan's avatar
      Jan
      Ideator I

      I tried this adding null check as mentioned. But its not working. showing up the same error still.

      Any idea or solution for this ?

      Thanks

      • Daan's avatar
        Daan
        Ideator I

        Same issue here. The snippet above does not seem to resolve it, even after clearing browser cache. Any thoughts Alderaan ?

  • Which ItemType do you use? Is it an OOTB ItemType or something you built by yourself?

    In general the Workflow menu doesn´t make much sense for most ItemTypes. You only need it for ItemTypes that have a Workflow.

    • Jan's avatar
      Jan
      Ideator I

      Itemtype is built by myself. 
      when a a revision is created (when maj_rev) is changed then the workflow in the navigate option of the item doesnt show up.  It throws error. 
      any solution on how to resolve it??