Filtering Lookup view

Posted by Joe A on 27-Feb-2016 15:16

I have Object called work order
Work Order is related to another Object called Location.
Then i have a line item object called Items Sold.
Items Sold is connected to Inventory.
Inventory is related to Location.
When Items Sold is to pick a inventory , i want it to show only Inventory
that is also related to the same location as the work order.

so what i am trying to do is a filter the lookp result based on the location that is selected on the work order.
I used

<script>
$(function() {
var fieldName = 'R223974574',
filterName = 'Description',
filterValue = 'desk');
rbf_setLookupFilter(fieldName, filterName, filterValue);
});
</script>

to test if it works,( i know this doesnt sort the location ) but it doesnt filter the result at all. ( I used the script on the Items Sold page )

What could i be doing wrong?

All Replies

Posted by Shiva Duriseati on 03-Mar-2016 06:21

Hi Joe,

If you are trying to load the values of inventory lookup in create new page of items sold, please add a method in onload event of new record page of inventory.

Ex: In the object definition page of "items sold",specify a method as "displayValues()" and add the script component in the design page of create new record page as below.

<script>

function displayValues(){

var fieldName = 'R223974574',

filterName = 'Description',

filterValue = 'desk');

rbf_setLookupFilter(fieldName, filterName, filterValue);

}

</script>

From the information provided, I can see only the "inventory" lookup option is available in "items sold" object. And work order is not related to items sold.

Regards,

Shiva

This thread is closed