Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

How to get the vendor complete vendor address in the purchase order report

Posted on by 1,737

i want to display the complete vendor address in the purchase order report,

i am writing the below code i am getting only some address only.

VendorAddress   = strRemoveCr(VendTable::find(PurchTable::find(purchId).OrderAccount).postalAddress().Street+', '+
                                                      LogisticsAddresssCity::findRecId(VendTable::find(PurchTable::find(purchId).OrderAccount).postalAddress().CityRecId).Description+', '+
                                                      VendTable::find(PurchTable::find(purchId).OrderAccount).postalAddress().DistrictName+', '+
                                                      LogisticsAddressState::find(VendTable::find(PurchTable::find(purchId).OrderAccount).postalAddress().CountryRegionId,VendTable::find(PurchTable::find(purchId).OrderAccount).postalAddress().State).Name+', '+
                                                      LogisticsAddressCountryRegionTranslation::find(VendTable::find(PurchTable::find(purchId).OrderAccount).postalAddress().CountryRegionId).ShortName+', '+
                                                      LogisticsAddressZipCode::findRecId(VendTable::find(PurchTable::find(purchId).OrderAccount).postalAddress().ZipCodeRecId).ZipCode);


can any one know about this please help me.

  • sohaibcheema Profile Picture
    sohaibcheema 46,594 User Group Leader on at
    RE: How to get the vendor complete vendor address in the purchase order report

    I am sorry, you code is in your hand, you can debug it to see what's missing and you can specify here what missing so we may help you in that,

    as you said it appears in original preview but it's not working on the purchase order print button, so you need to debug it and find out the reason.

  • srinivas pamidi Profile Picture
    srinivas pamidi 1,737 on at
    RE: How to get the vendor complete vendor address in the purchase order report

    can you please explain me relating to above code

  • srinivas pamidi Profile Picture
    srinivas pamidi 1,737 on at
    RE: How to get the vendor complete vendor address in the purchase order report

    actually it appears in original preview but it's not working on the purchase order print button

  • sohaibcheema Profile Picture
    sohaibcheema 46,594 User Group Leader on at
    RE: How to get the vendor complete vendor address in the purchase order report

    there is a table named as LogisticsPostalAddress

    this table saves all parts of address(city, country street etc). also it saves combination of all parts (Street+City+Country etc.)

    the combination of all parts of address is saved into Address(field) of LogisticsPostalAddress(Table)

    Now Kindly specify your definition of complete address and also specify what is missing at your end

  • srinivas pamidi Profile Picture
    srinivas pamidi 1,737 on at
    RE: How to get the vendor complete vendor address in the purchase order report

    Please see this screen shots_2D00_1.png

  • srinivas pamidi Profile Picture
    srinivas pamidi 1,737 on at
    RE: How to get the vendor complete vendor address in the purchase order report

    can you please explain me briefly.

  • sohaibcheema Profile Picture
    sohaibcheema 46,594 User Group Leader on at
    RE: How to get the vendor complete vendor address in the purchase order report

    address is saved in LogisticsPostalAddress.Address

    when it is saved it is saved in format which has been setup in the system.

    if you wan to get complete address w.r.t a vendor or PO, following line should return you complete address

    VendTable.postalAddress().Address

    as you have said, you are unable to get complete address, so you need to define your assumption for complete address and what is missing from that

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,263 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,112 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans