Hello,
You can write a Web API request where you can pass account id and it can return you required field, you can design your web api request using rest builder: github.com/.../releases
further you can set lookup like below
var object = new Array();
object[0] = new Object();
object[0].id = result.fieldname.id;
object[0].name = result.fieldname.name;
object[0].entityType = "entityname";
Xrm.Page.getAttribute("fieldname").setValue(object);
You can refer my sample if you are working with Dynamics 365 V> 9.0
http://himbap.com/blog/?p=2874