Fixed issue with javascript error when both add new and add existing related records are disabled for a grid widget, but the widget is still visible.
https://groups.google.com/d/msg/xataface/DgRz6Kc_fmo/SToSQN8Vo7AJ