I created a new lnkDocumentDLToPhysicalDevice class in order to have a new tab in a new class document created by me, for put in relationship document to physicaldevice.
In the details I need to put in relation only the physicaldevice in a particular state.
In the creation of a new document, the new tab appears and it shows me all physicaldevices.
I try to filter them putting a filter condition in the lnk class:
<classid="lnkDocumentDLToPhysicalDevice"_delta="define"><parent>cmdbAbstractObject</parent><properties><is_link>1</is_link><category>bizmodel</category><abstract>false</abstract><key_type>autoincrement</key_type><db_table>anedrone-lnkdocumentdltophysicaldevice</db_table><db_key_field>id</db_key_field><db_final_class_field/><naming><format>%1$s %2$s</format><attributes><attributeid="physicaldevice_id"/><attributeid="document_id"/></attributes></naming><display_template/><icon/><reconciliation><attributes><attributeid="physicaldevice_id"/><attributeid="document_id"/></attributes></reconciliation></properties><fields><fieldid="physicaldevice_id"xsi:type="AttributeExternalKey"><sql>physicaldevice_id</sql><target_class>PhysicalDevice</target_class><is_null_allowed>false</is_null_allowed><filter><![CDATA[SELECT PhysicalDevice FROM PhysicalDevice WHERE status = 'deliverable']]></filter><on_target_delete>DEL_AUTO</on_target_delete></field><fieldid="physicaldevice_name"xsi:type="AttributeExternalField"><extkey_attcode>physicaldevice_id</extkey_attcode><target_attcode>name</target_attcode></field><fieldid="document_id"xsi:type="AttributeExternalKey"><sql>document_id</sql><target_class>Document</target_class><is_null_allowed>false</is_null_allowed><on_target_delete>DEL_AUTO</on_target_delete></field><fieldid="document_name"xsi:type="AttributeExternalField"><extkey_attcode>document_id</extkey_attcode><target_attcode>name</target_attcode></field></fields>
but it shows me every physicaldevice.
So, the questions:
1) is there a way to filter the lnk class?
2) when I try to add a device, the modal window show me the search panel, is there a way to avoid this or to force user to make search only in the result of my filter? (I don't want user to have the ability to attach all kind of devices)
Thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi to all.
I created a new lnkDocumentDLToPhysicalDevice class in order to have a new tab in a new class document created by me, for put in relationship document to physicaldevice.
In the details I need to put in relation only the physicaldevice in a particular state.
In the creation of a new document, the new tab appears and it shows me all physicaldevices.
I try to filter them putting a filter condition in the lnk class:
but it shows me every physicaldevice.
So, the questions:
1) is there a way to filter the lnk class?
2) when I try to add a device, the modal window show me the search panel, is there a way to avoid this or to force user to make search only in the result of my filter? (I don't want user to have the ability to attach all kind of devices)
Thank you