Update a related list field in the grid realtime

Posted by Rollbase User on 19-Oct-2012 12:05

Hi All, I have three objects: Invoiceheader Invoicedetails Products The relation between Invoiceheader and Invoicedetails = 1:N (R52936967). The relation between Invoicedetails and products is N:1 (R52009765). I have configured the grid (invoicedetails) when creating an invoice. Within the grid i have a lookup list for products. I want to update another field called productprice realtime when selecting a product in the grid. I have added a script component on the page when creating an invoice for updating the other fields. The script component starts with "function rbf_showGridRow(rowIndex) {" and the "rbf_showGridRow(@@)" has been set correctly on the update event handler. Im trying to put the productprice to a variable with: var productprice = rbf_getGridValue2(0, 'R52009765.productprice', rowIndex); How can i update the field productprice when selecting a product in the grid? I have tried several ways, but without success. I hope that someone has the golden solution. Any idea is appreciat

All Replies

Posted by Admin on 19-Oct-2012 12:35

You need to use AJAX API rbf_getFields() or AJAX query API to bring price value to the page. Then call rbf_setGridContent2 to display received value.



Please check similar example in Chapter 7.

Posted by Admin on 20-Oct-2012 03:55

Pavel thanks a lot, it works with the rbf_getfields API. You are great!

This thread is closed