lookup contactperson

I am back to use contactperson::contactperson::lookupcustcontactperson()this method. For some reason, if there are two contacts for the customer, then only one is showed for lookup, ???

The method is using \Forms\ContactPersonLookup and it is simply joining the DirPerson with the contact person.
Compare the records to see if there are any differences, that are causing the data to not to show on the look up form.

Hi Gopinath, this temporary table works. I just created a temptable. Thanks a lot!

Hi,

Please make the thread as verified…

ok thanks a lot!

Why you have to reinvent something, when you have the ready to use code in standard?
Why do you even need a temp table? You have to fill it every time you open the lookup and it has its own performance implications. Depending on the data size(in the table), you may see the performance impact.

Hi Kranthi, I dont want to invent anything, but it does work for some reason. When i use the standard method contactperson::lookupCustContactPerson(), the only contact is showed who has primary address; but if you have more than 2 contacts , then it shows all . could not get time to find it out.

If you are not investigating that, then it will the same problem in the areas where the same code has been used.

Example - sales order.

Hi Kranthi, you are right. I will spend more time to find it out, what the problem is! Thanks a lot for all your replies!