Quantcast
Channel: Martin Dráb's Activities
Viewing all articles
Browse latest Browse all 17532

Multi table custom lookup

$
0
0

Hi Experts,

I need your help, I will need to create custom lookup - Contact person id and Name.

I am able to create "Contact person id" lookup but  for "Name" field we need another table "DirPartyTable".

How we use two table for creating lookup?

I gone through some blog, they have mentioned "SysMultiTableLookup" but I am not able to get it "SysMultiTableLookup" class.

Can you please suggest clue.

query = new Query();
contactPersonQBDS = query.addDataSource(tableNum(ContactPerson));
contactPersonQBDS.addRange(fieldNum(ContactPerson, ContactForParty)).value(strFmt("%1",vendTable.Party));

QbdsDirPartyTable = contactPersonQBDS.addDataSource(tablenum(DirPartyTable));

--QbdsDirPartyTable.joinMode(JoinMode::InnerJoin);
--QbdsDirPartyTable.relations(true);
--QbdsDirPartyTable.addLink(fieldNum(ContactPerson,party), fieldNum(DirPartyTable, RecId));

sysTableLookup = SysTableLookup::newParameters(tableNum(ContactPerson), sender);
sysTableLookup.addLookupField(fieldNum(ContactPerson, ContactPersonId));
--sysTableLookup.addLookupField(fieldNum(ContactPerson, Name));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();


Viewing all articles
Browse latest Browse all 17532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>