Menu

Object is not displaying after using AttributeLinkedSet tag

2023-04-18
2023-04-19
  • Abdullah Noman

    Abdullah Noman - 2023-04-18

    Hello there,

    I have two class : Circuit and CircuitRequest. I want to show all the tickets that comes for a specific Circuit on the device object view. I do have the AttributeExternalKey field in CircuitRequest class and used AttributeLinkedSet tag on the Circuit class , so that all the tickets linked to this Circuit would show up. But I keep getting this error and no idea why:
    Sorry, this object does not exist (or you are not allowed to view it).

    Here is my relavant code section:
    From Circuit class:

            <field id="tickets" xsi:type="AttributeLinkedSet" _delta="define">
                    <linked_class>CircuitRequest</linked_class>
                    <ext_key_to_me>circuit_id</ext_key_to_me>
                    <edit_mode>add_only</edit_mode>
                    <count_min>0</count_min>
                    <count_max>0</count_max>
                    <relation_type>link</relation_type>
                    <read_only>false</read_only>
                </field>
    

    From CircuitRequest class:

            <field id="circuit" xsi:type="AttributeExternalKey">
               <sql>circuit</sql>
               <target_class>Circuit</target_class>
               <is_null_allowed>true</is_null_allowed>
               <on_target_delete>DEL_MANUAL</on_target_delete>
               <allow_target_creation>true</allow_target_creation>
            </field>
    

    Kind Regards,

    Abdullah

     

    Last edit: Abdullah Noman 2023-04-18
  • Abdullah Noman

    Abdullah Noman - 2023-04-18

    No sorry I actually defined a new class name CircuitRequest and that part is okay.

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2023-04-18

    "Sorry, this object does not exist (or you are not allowed to view it)." kind of sounds like an issue with missing permissions.

     
  • Vincent @ Combodo

    Another try : the field is called "circuit" on one side and "circuit_id" on the other side, that cannot match

     
  • Abdullah Noman

    Abdullah Noman - 2023-04-19

    That was it. Thank you, this fixed the problem. Extremly grateful @cisou

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.