web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Delivery name and address in vendor account

(0) ShareShare
ReportReport
Posted on by 30

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!

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,563 Moderator on at
    RE: Delivery name and address in vendor account

    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). 

  • @rp@n Profile Picture
    30 on at
    RE: Delivery name and address in vendor account

    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?

  • Mohit Rampal Profile Picture
    12,563 Moderator on at
    RE: Delivery name and address in vendor account

    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.

  • @rp@n Profile Picture
    30 on at
    RE: Delivery name and address in vendor account

    Okay, you mean to say the method setAddressFromInventLocationId  is returning the Delivery name  and address for specific vendor account is it?

  • @rp@n Profile Picture
    30 on at
    RE: Delivery name and address in vendor account

    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? 

  • Suggested answer
    Mohit Rampal Profile Picture
    12,563 Moderator on at
    RE: Delivery name and address in vendor account

    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.

    pastedimage1682431728752v1.png

  • @rp@n Profile Picture
    30 on at
    RE: Delivery name and address in vendor account

    thanks Mohit, let me check

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,157

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 883 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 674 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans