Hi Experts,
In transfer order form we want to get vendor code and vendor address using lookup method. I am avail to get vendor code but i want to get vendor address also in D365FO.
Please tell me how to get vendor address in lookup.
Thanks & Regards
Rahul.
Dear Mohsin,
Vend account is coming from VandTable and Vendor address is coming from DirPartyPostalAddressView. These are the two different tables, so how to join these two tables and display the vendor code base on vendor address in lookup field.
Thanks and Regards,
Rahul.
this might help you:
Dear Mohsin,
Thank's for your reply.
Using of below code i am getting the vendor code.
/// <param name="e"></param>
[FormControlEventHandler(formControlStr(InventTransferOrders, InventTransferTable_IBC_ShipTo), FormControlEventType::Lookup)]
public static void InventTransferTable_ABC_ShipTo_OnLookup(FormControl sender, FormControlEventArgs e)
{
Query query = new Query();
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(VendTable), sender);
sysTableLookup.addLookupField(fieldNum(VendTable, AccountNum));
sysTableLookup.addLookupField(fieldNum(VendTable, VendGroup));
queryBuildDataSource = query.addDataSource(tableNum(VendTable));
//queryBuildRange = queryBuildDataSource.addRange(fieldNum(CustTable, CustGroup));
// queryBuildRange.value('40');
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
Could you please give me vendor address code also because vendor address is coming from another table.
Thanks & Regards
Rahul.
You need to update Lookup view of Vendor and add Vendor Code and Vendor Address fields.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156