Hi all,
when i click on look up then it will open new window for selecting documents,but it is not displaying any documents in the new window,if i assign a view to that selector then it is displaying all the documents in the system.
my question is how can i display only documents related to that client while opening the new window for selecting documents(OnLoad).
Hi SudhakarN,
Does this answer your question? or is there anything we can help you?
Regards,
Orchid
Hi SudhakarN,
You can use the rbf_setLookupFilter API for this.
First: Configure your grid, you can click on the gear icon beside your "Shipping Information" section label.
Click Next button > and in the bottom part set your function, something like "setGridFilter(@@);" (this is the function in the script below) to call it every create of new grid row. See image below.
Second: In your NEW or EDIT page create a new <Script Component> and paste the code below (just change the integration names with your fields).
<script>
function setGridFilter(gridIndex) {
//Get the ID/value of the parent to be use in the filter
var parentFilter = rbf_getFieldValue("R105266983");
//Grid Number - Note: 1st Grid is equal to 0, 2nd grid is 1 and so on...
var gridNumber = 0;
//Lookup field in the grid that you want to filter by its parent
var childField = "R105203172_"+gridNumber+"_"+gridIndex;
//This is same object as the 'parentFilter' above but this time the relationship of parent and child
//In your case go to object defination of 'Attachment' and get the integration name of 'Client' lookup
var parentField = "R105203549";
//RB API to set lookup filter
rbf_setLookupFilter(childField, parentField, parentFilter);
}
</script>
Hope this will help.
Regards,
Orchid
rbf_setLookupFilter will not set the value in the UI filter but filter through code.
thanks for your reply [mention:e6fb884e9c7b45a2a638966c06dc0941:e9ed411860ed4f2ba0265705b8793d05]
Hi SudhakarN,
Does this answer your question? or is there anything we can help you?
Regards,
Orchid