hi all,
While we creating a Purcahse order, we select a Vendor account and based on vendor account the Delivery name and address got changed.
I have dubugged the Vendor account - Modified method but not able to get the exact place where the Delivery name and address value assigned.
Kindly let me know the exact place where I can get the code for delivery & address.
Please give me more shed on this.
thanks!
thanks Mohit, let me check
Yes, for me setAddressFromInventLocationId method is returning Delivery name and address for specific vendor. I am saying it can be other method depending on different data/setup. Therefore, In addition to modifiedField method, add breakpoint on below highlighted methods as well in PurchTable table and debug.
hi Mohit,
I found below method in PurchTable
void setAddressFromVendTable(VendTable _vendTable) { LogisticsLocation location; LogisticsPostalAddress postalAddress = DirParty::primaryPostalAddress(_vendTable.Party); this.DeliveryName = _vendTable.name(); if (postalAddress) { this.DeliveryPostalAddress = postalAddress.RecId; location = LogisticsLocation::find(postalAddress.Location); if (location.Description) { this.DeliveryName = location.Description; } } else { this.DeliveryPostalAddress = 0; } this.AddressRefRecId = _vendTable.RecId; this.AddressRefTableId = _vendTable.TableId; }
I believe, this code change the Delivery name & address based on Vendor account
am i right?
Okay, you mean to say the method setAddressFromInventLocationId is returning the Delivery name and address for specific vendor account is it?
Yes, I debugged the code and the values were changing from setAddressFromInventLocationId method. You should put a breakpoint on modifiedField method of PurchTable table and decide which method you need to extend.
thanks Mohit,
modifiedFieldWithUserInput method for OrderAccount field in PurchTable right?
as you said "it is set on few places based on conditions (you will know when you debug the code)" for example like Purchase order creation and other places also where it got chnaged based on the order account selection
am i right?
DeliveryName and DeliveryAddress gets modified from ModifiedField method in PurchTable table. You can add breakpoint on modifiedFieldWithUserInput method for OrderAccount field case.
One of the method where its getting set is from setAddressFromInventLocationId method. (Methods where it can get set are setLocation, setAddressFromVendTable, setAddressFromInventSiteId).
André Arnaud de Cal...
292,162
Super User 2025 Season 1
Martin Dráb
230,962
Most Valuable Professional
nmaenpaa
101,156