I have the below function. I need to modify the caml to filter on a lookup field. I have not had much success. Help is appreciated.
function getAdditionalApprovals(){
var ListName = 'Additional Approvals';
var ctx = SP.ClientContext.get_current();
var list = ctx.get_web().get_lists().getByTitle(ListName);
var caml = SP.CamlQuery.createAllItemsQuery();
caml.set_viewXml("View><Query></Query></View>");
this.allitems = list.getItems(caml);
ctx.load(this.allitems);
ctx.executeQueryAsync(Function.createDelegate(this, this.onAdditionalSSucceededCallback ), Function.createDelegate(this, this.onAdditionalsFailedCallback));
}
faye fouladi