How to override lookup method of two lookups in a single dialog?

public void postBuild()

DialogField dialogSite1,dialogSite2;

dialogSite1 = this.bindInfo().getDialogField(contract,methodStr(AcxRequisitionAnalysisDataContract, parmFromSiteList));

dialogSite1.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(AcxRequisitionAnalysisUIBuilder,lookupSite1), this);

if (dialogSite1)

dialogSite2 = this.bindInfo().getDialogField(contract,methodStr(AcxRequisitionAnalysisDataContract, parmToSiteList));

dialogSite2.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(AcxRequisitionAnalysisUIBuilder ,lookupSite1), this);
if (dialogSite2)


I have wriiten the above code in my post build method. where i am trying to provide multi-select on two report parameters. But I am getting an error saying that i cannot override LOOKUP method twice in one instance, so I am not sure how to move forward with this and override two lookups at once.

Thank you.

What if you use two methods, each of them merely calling a third method with the actual logic?

Actually calling registeroverridemethod two times in my code to override lookup method but I am binding two different controls also. So how to prevent lookup overriding twice for two different parm methods.

I’m sorry, but I don’t understand either of these sentences.

In the above code I am overriding lookup method twice.

That is why it is showing this error

How to resolve this?

That’s the same thing as you asked originally. Have you tried my suggestion?

Let me repeat it: Try using two methods, e.g. lookupSiteFrom() and lookupSiteTo(), which would call another method (e.g. lookupSite()) containing the code you currently have in lookupSite1().

After you try it, please let us know whether you still have the same problem or not.

I tried as you suggested and still the same error is popping up.

I can’t confirm your statement - using the same lookup method for several controls works absolutely fine for me.