get the higher item in a product structure based on several ItemTypes

Former Member
Former Member
Hi Community, I don't understand what methods like getRelationships or getParentItem() do as I always get the same error when I use it: "Object reference not set to an instance of an object." What type of data is returned by these methods? I am looking for a way to go up in a product structure built using several ItemTypes (not like the standard solution where all is based on the "Part" ItemType with its class structure, in my case classes are made with ItemTypes). the structure is made like this: Part---partInstance--->Assy---AssyInstance--->Assy---AssyInstance--->Root How to go up until Root from a server event running on partInstance? Best regards, Camille
Parents
  • Former Member
    Former Member
    What is returned if the relationship I am looking for doesn't exist? The parent Assembly of the part instance (of which creation starts the method) can be linked to the next Assembly with 3 types of relationships. I don't know if it is the proper way but I am trying to do it with a if for each type
Reply
  • Former Member
    Former Member
    What is returned if the relationship I am looking for doesn't exist? The parent Assembly of the part instance (of which creation starts the method) can be linked to the next Assembly with 3 types of relationships. I don't know if it is the proper way but I am trying to do it with a if for each type
Children
No Data