I see several methods there and it’s impossible to guess where you problem lies. Please use the debugger to isolate the problem.
Maybe dlgCustomer.value() doesn’t return any value. Maybe it returns a customer ID that doesn’t exist. Maybe everything is fine here and you should be debugging the code inside lookupAddressForm() instead.
I found difference when this method call on form and dialog. If it call on form debugger will stop on
_callerFormControl.performFormLookup(formRun);
and wait until I select a record. But when I call from dialog it continue running. I’m not sure why they are not the same.
I guess that when I call on form, it passed FormReferenceControl to this method but in dialog I cannot pass that class because in dialogfield it calls FormStringControl.
If you’re passing a wrong type of parameter to lookupAddressForm() (FromStringControl instead of FormReferenceControl), you shouldn’t be surprise that it doesn’t work.
Either change the type of your control or change your code.