I have created a link lookup for one of my complex objects. When I visit the "New" page, the link lookup seems to work fine and update when I change the related field. But when I put them both in a grid, it stops working. Is there any way quick way I could get it to work?
Hi,
Dependent lookup seems to be not working on grid control but I have alternative way to make it work by using "rbf_setLookupFilter".
1. Go to Configure grid and set the onUpdate with your function in my sample is filterLookup(@@);
2. Save. Apply rbf_setLookupFilter in the script component with sample code below. Change the following codes:
R111029 --> Parent lookup (Warehouse) in grid, inspect element to get the integration name.
R130928 --> Dependent lookup (Product) in grid, inspect element the lookup to view integration name. See image
R56036 -- > This is an integration name of parent (warehouse) from Product Object. In my test, go to Product object definition and get the value of warehouse lookup integration name.
<script> function filterLookup(rowIndex) { var parentId = rbf_getGridValue2(0, "R111029", rowIndex); console.log(parentId); rbf_setLookupFilter("R130928_0_"+rowIndex, "R56036", parentId); } </script>
Hope this may help.
Regards,
Orchid
Hi,
Dependent lookup seems to be not working on grid control but I have alternative way to make it work by using "rbf_setLookupFilter".
1. Go to Configure grid and set the onUpdate with your function in my sample is filterLookup(@@);
2. Save. Apply rbf_setLookupFilter in the script component with sample code below. Change the following codes:
R111029 --> Parent lookup (Warehouse) in grid, inspect element to get the integration name.
R130928 --> Dependent lookup (Product) in grid, inspect element the lookup to view integration name. See image
R56036 -- > This is an integration name of parent (warehouse) from Product Object. In my test, go to Product object definition and get the value of warehouse lookup integration name.
<script> function filterLookup(rowIndex) { var parentId = rbf_getGridValue2(0, "R111029", rowIndex); console.log(parentId); rbf_setLookupFilter("R130928_0_"+rowIndex, "R56036", parentId); } </script>
Hope this may help.
Regards,
Orchid
Hi Matman,
Does the suggestion above works for you? Or do you still have followup questions regarding to this?
Thank you.
Regards,
Orchid
Hey Orchid, sorry I forgot to thank you for that awesome explaination. Works like a charm! :)
That's Great! You're welcome. :)
Regards,
Orchid