How can I update the values of lookup fields on a grid contr

Posted by jsniemi79 on 01-May-2015 08:26

I've got a page with a related grid control.  When a row is added or updated on the grid, I want to automatically populate the value of two lookup fields based on values from my main object.

If you look at this screenshot, I have an account and contact on my main object. Notice the account and contact on the grid row are showing as IDs currently.

I'm calling my function oncreate and onupdate of the grid.

Here is the code for my function

Currently, when I save the record, the related attachment is saved, but it is not being attached to the account or contact. Is this possible and if so, what should the code look like?  I'd also like for the values in the grid to be the value, not the ID if that is possible.

Thanks in advance for any suggestions.

All Replies

Posted by pvorobie on 01-May-2015 11:06
Posted by jsniemi79 on 01-May-2015 11:20

I looked at the documentation.  I've tried both grid content and set value apis, but it doesn't seem to work.  There is no example in the documentation that I could find that shows updating the value of a related field in the grid control.  That seems to be where there is something slightly different to make it work.

Posted by Orchid Corpin on 04-Jun-2015 19:19

Hi,

Found this related forum about setting lookup values. This might be helpful 

https://community.progress.com/community_groups/rollbase/f/25/p/7083/27430

Regards,

Orchid

This thread is closed