How to change the dropdown list after add relationship from the subpanel

I have a field location_type with dropdown list known_unknown_list. After adding the relationship through the subpanel I want to change it with im_location_type_list. And after unlink, the relationship wants to change it again known_unknown_list(or location_type field is null/blank).

Location Type Field(In Parent Module) on creating or Edit

Location Fied Showing Blank because option not in the list

Here we are pulling all Inventory Management field records in the Parent Module field like Location Type, Location(Building), Location (Rooms), etc.

Want to change these options to show in the field

I tried the SugarLogic SetOptions action but not working for me.

$dependencies['II_Inventory_Item']['setoptions_location_type'] = array(
   'hooks' => array("edit"),
   'trigger' => 'true',
   'triggerFields' => array('location_type'),
   'onload' => true,
   'actions' => array(
     array(
       'name' => 'SetOptions',
       'params' => array(
         'target' => 'location_type',
         'keys' => 'getDropdownKeySet("im_location_type_list")',
         'labels' => 'getDropdownValueSet("im_location_type_list")'
       ),
     ),
   ),
);
Parents Reply Children
No Data