How can we set a lookup field from client-side ? Then how can we refresh the lookup list displayed on screen ?
I don't think we fully support this. You can use rbf_setFieldValue(), but this API will not display selected record the way you'd expect.
I was able to set the lookup field with an object using this undocumented function.
rbf_selectObject( selectedObjectID, selectedObjectName, null, relationName, false);
rbf_selectObject( 11223344, "Snoopy", null, "R12345678", false);
where 11223344 is the id of object "Snoopy" which is an object of the same type as the relation R12345678 used by the lookup field R12345678
I'll provide documented and supported function for this purpose.
I know this is a very old post. Is there a documented function to set lookup value on client side?
You can use rbf_setFieldValue() API .
I have tried it in new UI and was able to set the lookfield by using below